Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Enhanced ESX Core Cron Task Handling #1130

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

ItsKuf
Copy link
Contributor

@ItsKuf ItsKuf commented Jul 26, 2023

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.

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.
Copy link
Member

@CsokiHUN CsokiHUN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

@CsokiHUN CsokiHUN changed the base branch from main to dev July 26, 2023 16:00
@Gellipapa
Copy link
Member

@ItsKuf Hi! Thank you for this improvement for cron as I watched no breaking changes happened so I merged.

@Gellipapa Gellipapa merged commit da530d6 into esx-framework:dev Jul 26, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants