You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When scheduling a cron task using lib.cron.new("0 21 * * *", callback, { debug = true }), the task sometimes fails to execute due to a scheduled time expired error. The logs show that the task is scheduled correctly, but when the execution time arrives, it is skipped with a message indicating it expired by a small margin (e.g., 1 second).
To Reproduce
Steps to reproduce the behavior:
Schedule a cron job with lib.cron.new("0 21 * * *", callback, { debug = true })
Wait for the scheduled time while monitoring logs.
Occasionally, the task is skipped due to a slight time drift, likely caused by server hitches.
Expected behavior
The scheduled task should execute at the specified time, with reasonable tolerance for minor server hitches.
Suggested Fix
Introduce an allowExpiredTasks parameter when scheduling a cron task:
st860923
changed the title
[Bug] Cron Task Occasionally Expires Due to Server Hitch
[Bug] Cron Task Occasionally Expires Due to Server Thread Hitch Warning
Feb 6, 2025
Describe the bug
When scheduling a cron task using
lib.cron.new("0 21 * * *", callback, { debug = true })
, the task sometimes fails to execute due to a scheduled time expired error. The logs show that the task is scheduled correctly, but when the execution time arrives, it is skipped with a message indicating it expired by a small margin (e.g., 1 second).To Reproduce
Steps to reproduce the behavior:
lib.cron.new("0 21 * * *", callback, { debug = true })
Expected behavior
The scheduled task should execute at the specified time, with reasonable tolerance for minor server hitches.
Suggested Fix
allowExpiredTasks
parameter when scheduling a cron task:PR #705
Additional context
FXServer Version: Build 7290
This issue does not occur consistently but seems to happen more frequently under higher server load.
Thanks for your time!
The text was updated successfully, but these errors were encountered: