Dynamic CronJob Manager
Schedule recurring game server commands from Takaro without editing code. Use it for timed announcements, save commands, cleanup tasks, reward reminders, restarts, or any other server command that should run on a cron schedule.
How it works
Dynamic CronJob Manager has one built-in cronjob, cronJobGenerator. You configure the jobs you want in the module settings, then the generator creates the real scheduled Takaro cronjobs for the current game server. When you change the config later, the generator updates matching jobs and removes generated jobs that are no longer configured for that server.
Generated jobs are scoped to the game server where the module is installed, so the same module version can be used on multiple servers without one server deleting another server's schedules.
Configuration
Add rows to the Cronjobs list:
- name: Optional label used in the generated cronjob name. Use names like
daily rewards, restart warning, or nightly cleanup.
- command: The game server command to run. Separate multiple commands with semicolons to run them as a sequence on the same schedule.
- temporalValue: The cron expression, such as
*/10 * * * * for every ten minutes or 15 2 * * * for 02:15 every day.
For example, a row named daily rewards with say first reminder; say second reminder creates two generated cronjobs on the same schedule. A row named nightly cleanup with save-all can run once per night.
Commands and generated cronjobs
Each generated cronjob executes exactly one command. If a config row contains multiple semicolon-separated commands, the module creates one generated cronjob per command and adds sequence suffixes such as seq1 and seq2 to the generated names.
The generated function checks the game server ID before sending the command, then runs the command through Takaro's game server command API. This keeps scheduled commands tied to the server that owns the config.
Managing changes
After editing, adding, or deleting rows in the config, let cronJobGenerator run again. It reconciles the generated jobs to match the current config:
- New rows create generated cronjobs.
- Changed rows update the generated cronjobs.
- Deleted rows remove only this server's generated cronjobs.
- Invalid cron config stops the generator before it changes generated jobs.
The dashboard cronjob/event views show the generator and generated scheduled jobs, which helps admins confirm what the module is managing.