System Functions (System Control)
Aborts a run of the specified task that the system has already started to process (i.e. a run with an EXECUTING state in the TASK_HISTORY output).
SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS( '<task_name>' )
Name of the task.
task_nameis a string so it must be enclosed in single quotes:
Note that the entire name must be enclosed in single quotes, including the database and schema (if the name is fully-qualified), i.e.
If the task name is case-sensitive or includes any special characters or spaces, double quotes are required to process the case/characters. The double quotes must be enclosed within the single quotes, i.e.
To prevent future runs of the task from starting, we recommend first suspending the task (using ALTER TASK … SUSPEND) and then executing this function.
Note that if the task is not suspended when this function is executed, it currently takes several minutes for the Snowflake cloud services to begin scheduling executions of this task again.
Abort the current run of a task with a case-insensitive name:
Abort the current run of a task with a case-sensitive name: