Cronjob
by @xueyetianya
Manage cron jobs with execution logging and failure alert tracking. Use when adding tasks, monitoring execution, debugging failed crons.
clawhub install cronjobπ About This Skill
name: CronJob description: "Manage cron jobs with execution logging and failure alert tracking. Use when adding tasks, monitoring execution, debugging failed crons." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["cron","job","scheduler","automation","admin","linux"] categories: ["Developer Tools", "Utility"]
CronJob
A comprehensive sysops toolkit for scanning, monitoring, reporting, and maintaining scheduled job operations. CronJob provides 18+ commands for tracking job events, performing health checks, managing backups, benchmarking performance, and exporting operational data in multiple formats.
Commands
| Command | Description |
|---------|-------------|
| cronjob scan | Record a scan entry β run without args to view recent scan entries |
| cronjob monitor | Record a monitoring observation β run without args to view recent entries |
| cronjob report | Log a report entry β run without args to view recent reports |
| cronjob alert | Record an alert β run without args to view recent alerts |
| cronjob top | Log a top-level event β run without args to view recent entries |
| cronjob usage | Track usage data β run without args to view recent usage entries |
| cronjob check | Record a check result β run without args to view recent checks |
| cronjob fix | Log a fix action β run without args to view recent fixes |
| cronjob cleanup | Record a cleanup operation β run without args to view recent cleanups |
| cronjob backup | Log a backup event β run without args to view recent backups |
| cronjob restore | Record a restore operation β run without args to view recent restores |
| cronjob log | Add a general log entry β run without args to view recent log entries |
| cronjob benchmark | Record a benchmark result β run without args to view recent benchmarks |
| cronjob compare | Log a comparison β run without args to view recent comparisons |
| cronjob stats | Display summary statistics across all log categories |
| cronjob export | Export all data to a file (formats: json, csv, txt) |
| cronjob search | Search across all log files for a keyword |
| cronjob recent | Show the 20 most recent activity entries from the history log |
| cronjob status | Health check β shows version, data directory, entry count, disk usage |
| cronjob help | Display available commands and usage information |
| cronjob version | Print current version (v2.0.0) |
Each data command (scan, monitor, report, etc.) works in two modes:
Data Storage
All data is stored locally in plain-text log files:
~/.local/share/cronjob/YYYY-MM-DD HH:MM| in per-category .log fileshistory.log with timestampsexport command can generate JSON, CSV, or TXT files from all log dataRequirements
set -euo pipefail)date, wc, du, head, tail, grep, basename, catWhen to Use
1. Cron job monitoring β Track the execution status of scheduled jobs, log failures, and set up alerts for review 2. Job audit trail β Record scan, check, and report entries to maintain a complete history of job operations 3. Backup & restore logging β Log backup and restore events with timestamps so you always know what happened and when 4. Performance benchmarking β Record benchmark results for scheduled tasks and compare them over time to spot regressions 5. Operational data export β Export all collected logs in JSON, CSV, or TXT format for dashboards, compliance, or further analysis
Examples
# Record a scan of cron job health
cronjob scan "all 12 scheduled jobs ran successfully today"Log a monitoring observation
cronjob monitor "backup-job took 45min, 3x longer than usual"Record an alert for a failed job
cronjob alert "daily-report cron failed at 03:00 β exit code 1"Log a fix action taken
cronjob fix "increased timeout for backup-job from 30m to 90m"View summary statistics across all categories
cronjob statsExport all data to CSV for spreadsheet analysis
cronjob export csvSearch for entries related to a specific job
cronjob search "backup-job"Quick health check
cronjob statusView the 20 most recent activity entries
cronjob recent
Configuration
Set CRONJOB_DIR to change the data directory. Default: ~/.local/share/cronjob/
*Powered by BytesAgain | bytesagain.com | hello@bytesagain.com*
β‘ When to Use
π‘ Examples
# Record a scan of cron job health
cronjob scan "all 12 scheduled jobs ran successfully today"Log a monitoring observation
cronjob monitor "backup-job took 45min, 3x longer than usual"Record an alert for a failed job
cronjob alert "daily-report cron failed at 03:00 β exit code 1"Log a fix action taken
cronjob fix "increased timeout for backup-job from 30m to 90m"View summary statistics across all categories
cronjob statsExport all data to CSV for spreadsheet analysis
cronjob export csvSearch for entries related to a specific job
cronjob search "backup-job"Quick health check
cronjob statusView the 20 most recent activity entries
cronjob recent
βοΈ Configuration
Set CRONJOB_DIR to change the data directory. Default: ~/.local/share/cronjob/
*Powered by BytesAgain | bytesagain.com | hello@bytesagain.com*