A crontab wrapper CLI that simplifies scheduling and managing recurring tasks on Unix-like systems.
# List all scheduled cron jobs for the current user scorpiox-cron list
# Run a backup script every day at 2:30 AM scorpiox-cron add "30 2 * * *" "/home/user/backup.sh" # Run a cleanup every Monday at midnight scorpiox-cron add "0 0 * * 1" "/usr/local/bin/cleanup --older-than 30d" # Collect system metrics every 5 minutes scorpiox-cron add "*/5 * * * *" "/opt/monitor/collect-metrics.sh"
# Remove a cron job by its index (from list output) scorpiox-cron remove 3 # Remove a job by matching the command pattern scorpiox-cron remove "backup.sh"
# Open the crontab in an interactive editor scorpiox-cron edit # Clear all cron jobs for the current user scorpiox-cron clear # Show crontab raw output (pass-through to crontab -l) scorpiox-cron raw
# Use preset schedules for common intervals scorpiox-cron add @hourly "/opt/sync/pull-updates.sh" scorpiox-cron add @daily "/opt/logs/rotate.sh" scorpiox-cron add @weekly "/opt/maintenance/vacuum-db.sh" scorpiox-cron add @reboot "/opt/services/start-all.sh"
# Typical server setup: schedule log rotation, backups, and monitoring scorpiox-cron add "0 3 * * *" "/opt/backup/snapshot.sh >> /var/log/backup.log 2>&1" scorpiox-cron add "*/10 * * * *" "/opt/health/check-services.sh" scorpiox-cron add "0 0 * * 0" "/opt/maintenance/prune-docker.sh" # Verify all jobs are installed scorpiox-cron list