Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

fix(cron): prevent duplicate executions and enhance type safety#690

Merged
thelindat merged 1 commit intooverextended:masterfrom
juddisjudd:master
Jan 19, 2025
Merged

fix(cron): prevent duplicate executions and enhance type safety#690
thelindat merged 1 commit intooverextended:masterfrom
juddisjudd:master

Conversation

@juddisjudd
Copy link
Collaborator

@juddisjudd juddisjudd commented Jan 18, 2025

This PR addresses two key issues with the cron implementation:

  1. Fixed unintentional duplicate executions by:

    • Adding lastRun timestamp tracking for each task
    • Adding a 60-second cooldown check between executions
    • Adding debug logging for prevented duplicates
  2. Enhanced type safety and validation:

    • Added proper type annotations for special cron expressions (like 'L' for last day)
    • Added support for named day/month formats (mon-fri, jan,dec)
    • Improved validation for ranges and step values
    • Enhanced error messages for invalid expressions

@thelindat thelindat merged commit cb6792e into overextended:master Jan 19, 2025
abdel1touimi pushed a commit to SaharaScripters/ox_lib that referenced this pull request Jan 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants