ask/celery — Issue #591: Set an expiration time on a periodic task
Author: lsemel
Created: 2012-01-17 21:14:03+00:00
State: open

Let's say I have a periodic task set up to execute ever minute. For some reason Celery's workers get stuck and Celery needs to be restarted - the now have a backup of one copy of that periodic task for every minute they weren't performing work. For normal tasks I can do this by adding an expires parameter to the call to apply_async, but periodic tasks are defined by a decorator.

Is there a way to set an expiration time on the periodic task, so it'll execute, say, between 0 and 10 minutes from the time it's fired off, or be discarded?