# How do I schedule or trigger a Snowflake task and choose its compute?

Exam: COF-C03 — SnowPro Core Certification Exam
Knowledge domain: Performance Optimization, Querying, and Transformation
Updated: 2026-11-25T08:00:25.03827+00:00
HTML: https://learningpathx.com/faq/COF-C03/cofc03-schedule-or-trigger-snowflake-tasks.html

## Also asked as

- What makes a Snowflake task start, and what permissions does its compute model require?
- How do I run Snowflake SQL on a clock or stream trigger with warehouse or serverless compute?

Use `SCHEDULE` for time-based work and a stream condition in `WHEN` for event-driven work. Assign a warehouse for user-managed compute or omit `WAREHOUSE` for serverless compute. Newly created tasks are suspended, so resume the task to enable routine scheduled or triggered runs.

A scheduled task can also check a `WHEN` condition at each scheduled run. A dedicated triggered task uses `WHEN SYSTEM$STREAM_HAS_DATA('db.schema.stream_name')` without `SCHEDULE`. For a serverless triggered task, specify `TARGET_COMPLETION_INTERVAL`. A user-managed triggered task instead names its warehouse. Write the transformation so an empty change set is harmless because `SYSTEM$STREAM_HAS_DATA` can return a false positive.

The creating role needs the required container and `CREATE TASK` privileges. By default, execution uses the task owner's privileges. The owner needs global `EXECUTE TASK`, the privileges the SQL itself requires, and either `USAGE` on the user-managed warehouse or global `EXECUTE MANAGED TASK` for serverless execution. Use `EXECUTE TASK` for a controlled manual test and verify task history and target results. Then use `ALTER TASK ... RESUME` to enable normal operation and check that the expected trigger or schedule is recorded.

[Introduction to tasks](https://docs.snowflake.com/en/user-guide/tasks-intro) · [CREATE TASK](https://docs.snowflake.com/en/sql-reference/sql/create-task) · [Triggered tasks](https://docs.snowflake.com/en/user-guide/tasks-triggered) · [SYSTEM$STREAM\_HAS\_DATA](https://docs.snowflake.com/en/sql-reference/functions/system_stream_has_data)

Source: [Snowflake SQL Transformation, Streams, Tasks, and Pipeline Patterns](https://learningpathx.com/news/snowflake-sql-transformation-streams-tasks-and-pipeline-patterns.html)
