This chapter covers the core features and capabilities of Cron Job Manager.
Follow this guide to get Cron Job Manager up and running in your environment.
# Run jobs from a config file in daemon mode
python src/cron_job_manager.py --config examples/cron_config.json --daemon
# List all registered jobs
python src/cron_job_manager.py --config examples/cron_config.json --list
# Run a specific job once
python src/cron_job_manager.py --config examples/cron_config.json --run-once backup_db
# View execution history
python src/cron_job_manager.py --config examples/cron_config.json --history backup_db
# View job statistics
python src/cron_job_manager.py --config examples/cron_config.json --stats{
"jobs": [
{
"name": "backup_db",
"command": "python scripts/backup.py --target /backups",
"schedule": "daily at 02:00",
"timeout_seconds": 300,
"max_retries": 2,
"alert_command": "curl -X POST https://hooks.example.com/alert -d '{\"job\": \"backup_db\", \"status\": \"failed\"}'",
"enabled": true
},
{
"name": "generate_reports",
"command": "python scripts/reports.py",
"schedule": "every 6h",
"depends_on": ["backup_db"],
"enabled": true
},
{
"name": "cleanup_temp",
"command": "find /tmp/app -mtime +7 -delete",
"schedule": "weekly on monday at 04:00",
"enabled": true
}
]
}| Flag | Default | Description |
|---|---|---|
--config, -c | — | Job configuration file (JSON) |
--daemon | false | Run as a background daemon |
--list | false | List all registered jobs |
--run-once | — | Run a specific job by name |
--history | — | Show execution history (optionally for a specific job) |
--stats | false | Show aggregate job statistics |
--tick-interval | 30 | Seconds between schedule checks |
--log-level | INFO | Logging level |
| Expression | Meaning |
|---|---|
every 5m | Every 5 minutes |
every 1h | Every hour |
every 6h | Every 6 hours |
daily at 09:00 | Every day at 9:00 AM |
daily at 02:00 | Every day at 2:00 AM |
weekly on monday at 04:00 | Every Monday at 4:00 AM |
Get the full Cron Job Manager and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.