Launch a job in the future

This section is about launching a job once, but in the future. You may want to read the periodic launch section.

From the code

If a job is configured with a date in the future, it will run at the first opportunity after that date. Let’s launch the task that will trigger the infamous 2038 bug:

dt = datetime.datetime(2038, 1, 19, 3, 14, 7).replace(

Also, you can configure a delay from now:

clean.configure(schedule_in={"hours": 1, "minutes": 30}).defer()

The details on the parameters you can use are in the python documentation.

From the command line

$ procrastinate defer \
    --at=2038-01-19T03:14:07Z \ '{"crash_everything": true}'

Or for an interval (in seconds):

$ procrastinate defer --in=5400