For many workflows which are time sensitive, requesting functionality to specify an absolute RequeueAt time instead of only relative delays.
Motivation
- Time-sensitive workflows – Many workflows need to execute at specific absolute times (e.g., "run at 3:00 PM EST", "execute at market open", "process at end of business day").
- Scheduled operations – Relative delays (
ReQueueAfterSignal) are insufficient when the exact execution time matters, especially across time zones or when workflows are created hours/days in advance.
- Precision scheduling – Absolute timestamps eliminate drift from relative delay calculations and ensure consistent execution times.
Current State
What Exists
| Component |
Location |
Purpose |
ReQueueAfterSignal |
python-sdk/exospherehost/signals.py |
Relative delay requeue (timedelta) |
re_queue_after_signal |
state-manager/app/controller/re_queue_after_signal.py |
Backend handler for relative delays |
enqueue_after field |
state-manager/app/models/db/state.py |
Timestamp (ms) when state should be enqueued |
Current Limitations
ReQueueAfterSignal only accepts timedelta (relative delay)
- Must calculate relative delay from current time to target time
- Prone to timing errors if calculation happens at wrong moment
- No direct way to specify "requeue at 2025-01-15 14:30:00 UTC"
Proposed Solution
New Signal: RequeueAtSignal
Add a new signal class that accepts an absolute timestamp (datetime) instead of a relative delay.
from exospherehost import RequeueAtSignal
from datetime import datetime, timezone
# Requeue at a specific absolute time
target_time = datetime(2025, 1, 15, 14, 30, 0, tzinfo=timezone.utc)
raise RequeueAtSignal(target_time)
Key Features
- Absolute timestamp support – Accept
datetime objects with timezone awareness
- Backward compatibility – Keep
ReQueueAfterSignal unchanged
- Validation – Ensure timestamp is in the future
- Timezone handling – Support timezone-aware datetimes, convert to UTC internally
For many workflows which are time sensitive, requesting functionality to specify an absolute
RequeueAttime instead of only relative delays.Motivation
ReQueueAfterSignal) are insufficient when the exact execution time matters, especially across time zones or when workflows are created hours/days in advance.Current State
What Exists
ReQueueAfterSignalpython-sdk/exospherehost/signals.pyre_queue_after_signalstate-manager/app/controller/re_queue_after_signal.pyenqueue_afterfieldstate-manager/app/models/db/state.pyCurrent Limitations
ReQueueAfterSignalonly acceptstimedelta(relative delay)Proposed Solution
New Signal:
RequeueAtSignalAdd a new signal class that accepts an absolute timestamp (datetime) instead of a relative delay.
Key Features
datetimeobjects with timezone awarenessReQueueAfterSignalunchanged