Commit Graph

62 Commits

Author SHA1 Message Date
_Not_ 4dd4c9c8ca Merge pull request #1839 from seltonmt012/fix/cron-callback-guard
fix(cron): keep the scheduler alive when a job errors
2026-08-14 19:41:00 -05:00
Selt 1b5e29c62b fix(cron): build the scheduled time from the day the job belongs to
OnTime always built scheduledTimestamp from the date of the current tick, so
a tick that skipped the 23:59 minute compared it against 23:59 of the next
day. The run was dropped without a trace. Fall back to the previous day when
the scheduled time lands in the future.
2026-07-28 00:44:30 +02:00
Selt f98a6e2245 fix(cron): keep the scheduler alive when a job errors
Registered jobs are third party callbacks and were invoked bare. An error inside
one propagates out of OnTime into Tick, so Tick never reaches its
SetTimeout(60000, Tick) at the end and nothing ever reschedules it. From that
moment cron is dead for every resource on the server - paychecks, cleanups,
anything registered through cron:runAt - until a restart. The operator sees one
stack trace and then silence.

Wrapping the callback keeps the loop and the reschedule intact, and names the job
that failed.

Simulated the scheduler chain in standalone Lua with three jobs where the first
raises: before, the tick died before SetTimeout and the two later jobs never ran
again; after, the failure is reported and both later jobs fire.
2026-07-27 21:17:12 +02:00
ASTROWwwW 511f5fc74e chore: bump manifest version to 1.14.0 2026-07-18 16:58:18 +02:00
Arctos. de98981ea6 Change domains 2026-05-25 12:12:51 +02:00
zykem#0643 efedf3c303 chore: bump manifest version to 1.13.5 2026-05-08 11:30:59 +02:00
Manifest Bumper 69fe76ca38 chore: bump manifest version to 1.13.4 2025-10-01 22:16:13 -05:00
Manifest Bumper 73ccea1b4e chore: bump manifest version to 1.13.3 2025-08-19 22:39:13 +00:00
Manifest Bumper 224d06fad2 chore: bump manifest version to 1.13.2 2025-08-13 15:34:40 +00:00
Manifest Bumper 830c567cfd chore: bump manifest version to 1.13.1 2025-08-02 11:09:55 +00:00
Manifest Bumper 3a9e0f316e chore: bump manifest version to 1.13.0 2025-07-26 17:05:56 +00:00
Manifest Bumper 72a1397823 chore: bump manifest version to 13.13.0 2025-07-26 17:04:08 +00:00
Arctos2win 97aaf58a02 Revert "chore: update copyright year" 2025-01-08 14:17:39 +01:00
Kasey FItton 968c558804 chore: update copyright year 2025-01-08 12:31:50 +00:00
Manifest Bumper 642b1e60ce chore: bump manifest version to 1.12.3 2025-01-06 14:45:23 +00:00
Kasey FItton 83e3538f43 chore: update docs link 2025-01-06 14:51:07 +01:00
Kasey FItton 34203c199f chore: version bump 2025-01-02 04:54:22 +00:00
Manifest Bumper d6fa11fc69 chore: bump manifest version to 1.12 2025-01-01 21:57:19 +00:00
Kasey FItton 803508ba2f Merge branch 'dev' into vehicle-spawn-validation 2024-12-04 05:59:39 +00:00
Manifest Bumper 0cac6f5163 chore: bump manifest version to 1.11.4 2024-11-30 16:10:50 +00:00
Kasey Fitton 042ad3498d Merge pull request #1495 from Fellow1990/main
update: menu.lua
2024-11-21 17:51:11 +00:00
Manifest Bumper efafa58eb2 chore: bump manifest version to 1.11.3 2024-11-18 22:02:42 +00:00
Ilias Rbayti 0576b20967 validate serialized function references 2024-11-15 15:28:45 +01:00
Ilias Rbayti 6b91207cc9 refactor(cron/server/main): Add more type annotations 2024-11-14 12:33:35 +01:00
Ilias Rbayti b69385fff6 refactor(cron/server/main): More appropriate variable names 2024-11-14 12:29:48 +01:00
Ilias Rbayti 4bb69c15e8 refactor(cron/server/main): Add type annotations 2024-11-14 12:26:39 +01:00
Ilias Rbayti 1aae1970a3 refactor/cron/server/main): Validate event params 2024-11-14 12:21:24 +01:00
Manifest Bumper e53a62844b chore: bump manifest version to 1.11.2 2024-11-11 21:30:56 +00:00
Kasey FItton a5f5335d3b chore: version bump 2024-11-09 08:55:24 +00:00
Kasey FItton 757a8ea2f7 tweak: prep update versioning 2024-11-09 00:46:45 +00:00
Summer 459f44d5e1 Fix minute not working, put back day check 2024-11-05 16:45:45 +08:00
Manifest Bumper 6d86afac68 chore: bump manifest version to 1.10.10 2024-10-20 19:00:39 +00:00
Manifest Bumper 424db9cf77 chore: bump manifest version to 1.10.9 2024-10-14 20:16:29 +00:00
Manifest Bumper 1d0b275a7f chore: bump manifest version to 1.10.8 2024-10-10 16:29:56 +00:00
Arctos2win d0d0203780 fix(esx_core): correct licenses, remove license from package, update license years, create license for progressbar 2024-08-06 20:36:16 +02:00
Gellipapa fde64e507a 📦 Bump version to 1.10.7 2024-06-19 00:08:05 +02:00
Gellipapa f3c5424093 🚑 bump version to 1.10.6 2024-06-16 15:20:48 +02:00
Thekuca 2dbc339aaf chore(LICENSE): update copyright year 2024-03-07 16:37:29 +01:00
Gellipapa 8e94cad87e Merge branch 'dev' into fix-dev-to-main 2024-02-29 22:37:15 +01:00
Manifest Bumper 731b6a13b8 chore: bump manifest version to 1.10.5 2024-02-17 22:53:26 +00:00
Kasey FItton 77e880a715 refactor: add better descriptions to the fxmanifests 2024-02-11 15:04:21 +00:00
Manifest Bumper 82affe3e1e chore: bump manifest version to 1.10.4 2024-01-30 20:08:06 +00:00
Gellipapa 8a91473ff7 📝 Update fxversion to 1.10.3 2024-01-25 00:34:22 +01:00
Gellipapa 9d90c9d674 🎨 Run formatter 2024-01-24 23:07:30 +01:00
TheFantomas b8d2c14bf3 Version fixes 2023-09-21 14:46:05 +02:00
Gellipapa 1f48b63af2 Merge pull request #1149 from DasistOnly/main
updated README files
2023-08-17 23:51:22 +02:00
Thekuca 48c9662377 fix(cron): fix unused args 2023-08-17 00:07:39 +02:00
Only 33483cb0cf updated README files
updated the documentation urls
2023-08-07 21:28:41 +02:00
ItsKuf ea14a80fa0 🚀 Enhanced ESX Core Cron Task Handling
Description:
This commit brings substantial enhancements to the time handling functionality in the 'esx_core/[core]/cron/server/main.lua' script for the FiveM server:

- Utilized Unix Timestamps: Replaced the existing `GetTime()` function with `GetUnixTimestamp()`, ensuring precise time representation by using the Unix timestamp format (seconds since January 1, 1970). This change mitigates potential issues related to Daylight Saving Time (DST) transitions.

- Refined Task Execution Logic: The `OnTime` function has been refactored to operate based on Unix timestamps, ensuring accurate execution of scheduled tasks without any inconsistencies due to local time conversions.

By introducing these improvements, the cron-like system now operates with enhanced accuracy, bolstering the stability and predictability of scheduled events on the FiveM server. Extensive testing has been conducted to guarantee compatibility with various server environments.
2023-07-26 09:52:33 +01:00
Jean-Baptiste 815945de5d change version name to 1.10.1 2023-07-10 23:30:14 +02:00