This pull request introduces a new command: ./gameserver toggle-cronjobs
This command simplifies cronjob management for LinuxGSM users and auto deployment scripts, making it easier to ensure that server monitoring, updates, and restarts are performed automatically according to the specified schedules.
The toggle-cronjobs command operates by identifying whether cronjobs, using the specified LinuxGSM commands, exist within the system's crontab and wehter these were aded by LinuxGSM:
If there is no cronjob using the specified LinuxGSM command, a new cronjob will be created for the specified command.
If there is a cronjob using the specified LinuxGSM command that was added by LinuxGSM, the cronjob will be removed.
If there is a cronjob using the specified LinuxGSM command that was NOT added by LinuxGSM, the specified LinuxGSM command will be skipped and no cronjob will be added or removed.
I've chosen to include similar cronjobs as the Example cronjobs:
Currently the output of all LinuxGSM managed cronjobs including all erros will be sent to /dev/null. It might be woth saving the logs to LinuxGSM's log dir.
Fixes #4329
Type of change
[ ] Bug fix (a change which fixes an issue).
[x] New feature (a change which adds functionality).
Description
This pull request introduces a new command:
./gameserver toggle-cronjobs
This command simplifies cronjob management for LinuxGSM users and auto deployment scripts, making it easier to ensure that server monitoring, updates, and restarts are performed automatically according to the specified schedules.
The
toggle-cronjobs
command operates by identifying whether cronjobs, using the specified LinuxGSM commands, exist within the system's crontab and wehter these were aded by LinuxGSM:I've chosen to include similar cronjobs as the Example cronjobs:
Currently the output of all LinuxGSM managed cronjobs including all erros will be sent to
/dev/null
. It might be woth saving the logs to LinuxGSM's log dir.Fixes #4329
Type of change
Checklist
PR will not be merged until all steps are complete.
develop
branch as its base.Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
Thank you for your Pull Request!