Jobs calendar
Compute the next run times of the jobs of the server over a horizon of up to 92 days, with the cron library of the job scheduler and in the time zone of the server, so the times are exactly the ones the scheduler will use. Each job comes with its script, its pattern, its state (active, paused, running, scheduled), the last and next fire times of the running scheduler, the number of runs and their regular gap. Typical uses: plan a maintenance window, check that two heavy jobs do not run at the same time, find the jobs whose pattern or script is broken.
job calendarjob calendar

job calendar


Description

    The next run times of all the jobs the user can see over the next 24 hours: {now, time_zone, utc_offset, from, to, hours, scheduler (started, stopped), maintenance, jobs_count, timed_out, jobs: [{id, script, script_exists, pattern, active, login, cluster_script, running, scheduled, previous_fire, next_fire, valid, error, runs_total, runs_total_capped, every_s, runs_returned, runs}]}; the times are yyyy-MM-dd HH:mm:ss in the time zone of the server

admin
job calendar
mentdb
{"now": "2026-11-12 13:08:37", "time_zone": "Indian/Reunion", "utc_offset": "+04:00", "from": "2026-11-12 13:08:37", "to": "2026-11-13 13:08:37", "hours": 24, "scheduler": "started", "maintenance": false, "jobs_count": 15, "timed_out": false, "jobs": [{"id": "auto_report", "script": "app.100.template.auto_report.actions.MENTDB.auto_reports.execute_cron.exe", "script_exists": true, "pattern": "0 0 * * * ?", "active": false, "login": "admin", "cluster_script": null, "running": false, "scheduled": false, "previous_fire": null, "next_fire": null, "valid": true, "error": null, "runs_total": 24, "runs_total_capped": false, "every_s": 3600, "runs_returned": 2, "runs": ["2026-11-12 14:00:00", "2026-11-12 15:00:00"]}, {"id": "server.backup", "script": "server.backup.post", "script_exists": true, "pattern": "0 0 4 * * ?", "active": true, "login": "admin", "cluster_script": null, "running": false, "scheduled": true, "previous_fire": null, "next_fire": "2026-11-13 04:00:00", "valid": true, "error": null, "runs_total": 1, "runs_total_capped": false, "every_s": null, "runs_returned": 1, "runs": ["2026-11-13 04:00:00"]}]}

job calendar <json_params>


Description

    The run times with parameters: hours (24, 1 to 2208: the horizon, 92 days at most), from (the start, yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss in the time zone of the server; now by default), job (only this job id), max_runs (500, 1 to 5000: the times returned for each job)

Parameters

    json_params:   The parameters - String - required
admin
job calendar "{\"job\": \"server.backup\", \"hours\": 72, \"from\": \"2026-11-13\"}"
mentdb
{"now": "2026-11-12 12:15:08", "time_zone": "Indian/Reunion", "utc_offset": "+04:00", "from": "2026-11-13 00:00:00", "to": "2026-11-16 00:00:00", "hours": 72, "scheduler": "stopped", "maintenance": false, "jobs_count": 1, "timed_out": false, "jobs": [{"id": "server.backup", "script": "server.backup.post", "script_exists": true, "pattern": "0 0 4 * * ?", "active": true, "login": "admin", "cluster_script": null, "running": false, "scheduled": false, "previous_fire": null, "next_fire": null, "valid": true, "error": null, "runs_total": 3, "runs_total_capped": false, "every_s": 86400, "runs_returned": 3, "runs": ["2026-11-13 04:00:00", "2026-11-14 04:00:00", "2026-11-15 04:00:00"]}]}
Fixed result on the jobs of a development server (a session is needed): a job every 30 seconds over one hour: 120 runs, the first 3 returned
admin
job calendar "{\"job\": \"server.stack\", \"hours\": 1, \"from\": \"2026-11-13 00:00\", \"max_runs\": 3}"
mentdb
{"now": "2026-11-12 12:15:08", "time_zone": "Indian/Reunion", "utc_offset": "+04:00", "from": "2026-11-13 00:00:00", "to": "2026-11-13 01:00:00", "hours": 1, "scheduler": "stopped", "maintenance": false, "jobs_count": 1, "timed_out": false, "jobs": [{"id": "server.stack", "script": "server.stack.post", "script_exists": true, "pattern": "0/30 * * * * ?", "active": true, "login": "admin", "cluster_script": null, "running": false, "scheduled": false, "previous_fire": null, "next_fire": null, "valid": true, "error": null, "runs_total": 120, "runs_total_capped": false, "every_s": 30, "runs_returned": 3, "runs": ["2026-11-13 00:00:00", "2026-11-13 00:00:30", "2026-11-13 00:01:00"]}]}
A horizon over 92 days
admin
job calendar "{\"hours\": 3000}"
mentdb
ERROR: Sorry, an error appears (the parameter 'hours' must be an integer from 1 to 2208).
A start that is not a date
admin
job calendar "{\"from\": \"tomorrow\"}"
mentdb
ERROR: Sorry, an error appears (the parameter 'from' must be a date yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss).