Cron Job Recipes
Ready-made scheduled tasks — each with a cron schedule, a runnable script, and a heartbeat monitor so you know it actually ran.
Backups
Database and file backups you can restore from
Nightly PostgreSQL Backup with pg_dump
Automate compressed, timestamped PostgreSQL backups each night and get alerted if the backup fails or never runs.
0 2 * * *Automate Nightly MySQL/MariaDB Backup with mysqldump
Schedule a compressed, timestamped mysqldump backup every night and get alerted if the backup silently stops running.
0 2 * * *Nightly S3 Backup with Retention via AWS CLI
Sync a local directory to Amazon S3 each night, prune old backups with lifecycle rules, and get alerted if the job silently fails.
0 2 * * *Reports & Email
Scheduled reports and digest emails
Automate Weekly Summary Email Reports
Query your data source, format a summary, and email it automatically every week — with heartbeat monitoring so you know it actually ran.
0 8 * * 1Automate Daily Sales and Metrics Reports
Schedule a morning script to pull sales data from your report endpoint or DB and deliver a daily metrics summary automatically.
0 7 * * *Maintenance & Cleanup
Database and disk housekeeping jobs
Auto-Purge Old Database Rows on a Schedule
Delete expired sessions, soft-deleted records, and stale logs from your database automatically to keep tables lean and queries fast.
0 3 * * *Auto-Clean Temp Files and Old Uploads by Age
Schedule a daily find -mtime sweep to delete stale temp files and old uploads, keeping disk space under control automatically.
0 3 * * *Rotate and Compress Application Logs on a Schedule
Automate log rotation and compression to reclaim disk space, prevent runaway log growth, and keep your servers healthy.
0 2 * * *Refresh PostgreSQL Materialized View on a Schedule
Keep cached query results fresh by running REFRESH MATERIALIZED VIEW CONCURRENTLY on a cron schedule with heartbeat monitoring.
0 * * * *Automate PostgreSQL VACUUM ANALYZE with Monitoring
Schedule a weekly VACUUM ANALYZE on all tables to reclaim bloat, update planner stats, and keep query performance sharp.
0 3 * * 0Health & Monitoring
Health checks and expiry monitoring
Monitor SSL Certificate Expiry and Alert Early
Check a domain's SSL/TLS certificate expiry daily and send an alert before it expires, preventing surprise outages.
0 8 * * *Monitor Website Health Endpoint Every 5 Minutes
Poll any URL for a 2xx HTTP response on a schedule and get alerted instantly if the endpoint is down or returns an error.
*/5 * * * *Sync & Integrations
Data syncs and API integrations
Sync Data Between Two APIs on a Schedule
Automate a fetch-transform-push ETL pipeline between any two APIs, running on a cron schedule with heartbeat monitoring.
0 * * * *Auto-Ping Search Engines to Re-Crawl Your Sitemap
Schedule automatic sitemap pings to Google and Bing so search engines crawl your latest content without manual resubmission.
0 6 * * 1