The EXECUTE TASK privilege allows a role to run Snowflake tasks. Grant it at the account level before a development or pipeline role manually runs a task or allows task execution; task creation alone does not enable execution. section 2.5 section 13.1.2
Use ACCOUNTADMIN for the grant, then switch back to the role used for task development. Tasks are created suspended, so they must also be resumed before scheduled pipeline execution can begin. section 2.5 section 13.1.3
use role accountadmin; grant execute task on account to role sysadmin; use role sysadmin;
Grant the privilege with ACCOUNTADMIN, then return to the development role before executing the task. section 2.5
Test a task before scheduling it
After granting the privilege, run `EXECUTE TASK COPY_ORDERS_TASK;` to schedule an immediate test run. Query `INFORMATION_SCHEMA.TASK_HISTORY()` and inspect the latest state: SUCCEEDED confirms completion, while FAILED exposes an error message for investigation. section 13.1.3 section 13.5
Use the privilege within a controlled task-development workflow:
- Grant `EXECUTE TASK` on the account to the role that creates and runs pipeline tasks. section 13.1.2
- Manually execute a task to validate its SQL before relying on its schedule. section 13.1.3
- Check TASK_HISTORY() for scheduled, executing, succeeded, failed, or skipped runs; correct task SQL or configuration when needed. section 13.1.3 section 13.5
