I am currently working on a snowflake "task" to upsert a table every day in the early hours.
My current task is created using the below syntax -
CREATE OR REPLACE TASK "DB"."SCHEMA"."SAMPLE_TASK"
WAREHOUSE = SAMPLE_WAREHOUSE
SCHEDULE = 'USING CRON * 12 * * * UTC'
TIMESTAMP_INPUT_FORMAT = 'YYYY-MM-DD HH24'
AS
CREATE OR REPLACE "DB"."SCHEMA"."EMP"
AS
SELECT * FROM "DB"."SCHEMA"."EMP_STAGE";
I work in CST, and with UTC being -7 hrs, my task was expected to run at 5am in the morning, which it did. I confirmed that using "TASK_HISTORY" in the INFORMATION_SCHEMA -
SELECT * FROM TABLE(DB.INFORMATION_SCHEMA.TASK_HISTORY()) WHERE NAME = 'SAMPLE_TASK';
But it also ran for an extra 59 times for every minute of the remaining hour until 6.
- Initial QueryID timestamp - 2020-07-02 05:00:00.000 -0700
- Final QueryID timestamp - 2020-07-02 05:59:00.000 -0700
Am I missing anything here?
Thanks for reading through, any help is greatly appreciated.
-Sri