Summary
Add option to run a job immediately when it's added, rather than waiting for the first scheduled time.
Upstream Reference
Related Issues
Note: #221 and #222 may already cover this use case. This issue tracks the specific ScheduleEntryNow approach from PR robfig#511.
Problem
When adding a job that runs infrequently (e.g., daily), users often want it to execute immediately for:
- Initial data population
- Testing/validation
- Ensuring timely first execution
Proposed API
// Option 1: ScheduleEntryNow function
c.ScheduleEntryNow(entry)
// Option 2: AddFunc with immediate flag
c.AddFunc("@daily", myFunc, cron.WithImmediate())
// Option 3: Entry method
entry := c.Entry(id)
entry.RunNow()
Priority
Medium - Common requirement for job initialization.
Implementation Notes
Consider interaction with SkipIfStillRunning and DelayIfStillRunning wrappers.
Summary
Add option to run a job immediately when it's added, rather than waiting for the first scheduled time.
Upstream Reference
ScheduleEntryNowfunction to trigger entry immediately outside of schedule robfig/cron#511 - ScheduleEntryNowRelated Issues
Note: #221 and #222 may already cover this use case. This issue tracks the specific ScheduleEntryNow approach from PR robfig#511.
Problem
When adding a job that runs infrequently (e.g., daily), users often want it to execute immediately for:
Proposed API
Priority
Medium - Common requirement for job initialization.
Implementation Notes
Consider interaction with SkipIfStillRunning and DelayIfStillRunning wrappers.