moo.sdk.tasks.cancel_scheduled_task

moo.sdk.tasks.cancel_scheduled_task(pk)

Delete a django_celery_beat.PeriodicTask row by primary key.

Used by daemon lifecycle verbs ($daemon.disable, $daemon.recycle) to remove the PT created by invoke() (periodic=True). Idempotent: returns False if no PT with that pk exists.

Parameters:

pk (int) – the PeriodicTask.pk returned by invoke()

Return type:

bool

Returns:

True if a row was deleted, False if not found

Raises:

UserError – if the current caller is not a wizard