Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

DynamicCronjobs

by Limon

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.
Dynamic cronjob config

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.
Dynamic cronjob dashboard view
communityTakaro main

Components Overview

1
config
0
commands
0
hooks
1
Cron Jobs
0
functions
0
permissions

Module Updated

November 26, 2025
Module updated with improvements and fixes.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (1)

cronjobsarray
Cronjobs

List of cronjobs and their schedules

Default: [] (empty array)

UI Schema

No UI schema defined. Configuration form will use default rendering.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

cronJobGenerator

*/15 * * * *Schedule

Description

Validates user config and reconciles generated cronjobs for this game server.

Schedule Details

Cron Expression
*/15 * * * *
Human-Readable Schedule

Every 15 minutes

Function Implementation

cronJobGenerator Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.