Overview

Defer allows you to reschedule an already enqueued execution, which is useful when you have a scheduled notification and need to change the date. It is only possible to reschedule execution in a queue, not while it is running or after it has finished.

There could be a conflict between rescheduling and discard after option. For example, if you reschedule an execution for a date after the discard after date, your execution will always be discarded because the discard date comes before the rescheduled date.

If you call to reschedule without providing a specific date and time or duration, the execution will be rescheduled for the current moment.

Examples

import { rescheduleExecution } from "@defer/client";

rescheduleExecution("0uk1Hbc9dQ9pxyTqJ93IUrfhdGq");