79475392

Date: 2025-02-28 11:42:59
Score: 0.5
Natty:
Report link

You can create a task using the below piece of code

CREATE TASK mytask_hour 
WAREHOUSE = mywh 
SCHEDULE = 'USING CRON 0 9-17 * * SUN America/Los_Angeles' 
AS
CALL SP_LOAD_PKG_LAB_SKU_LIST();

https://docs.snowflake.com/en/sql-reference/sql/create-task

Once the task is created, you should resume the task, for the task to execute as per the schedule

ALTER TASK mytask_hour RESUME;

https://docs.snowflake.com/en/sql-reference/sql/alter-task#examples

EXECUTE TASK <name>;

Manually triggers an asynchronous single run of a task (either a standalone task or the root task in a task graph) independent of the schedule defined for the task.

https://docs.snowflake.com/en/sql-reference/sql/execute-task

SHOW TASKS; 

will list the tasks and certain associated details https://docs.snowflake.com/en/sql-reference/sql/show-tasks

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: sprethepa