Back to Cron Helper
Recipemonitoringnetworkcurluptime

Website Uptime Monitoring

Simple cron job to check if a website is reachable.

This command sends a HEAD request to your website to check if it returns a 200 OK status. You can combine this with a conditional logic (&& or ||) to send an email or trigger an alert if the site is down.

Cron Schedule

Every 5 Minutes*/5 * * * *
Runs at minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 of every hour.

Command to Run

Copy and paste this command into your crontab or automation script

curl -Is https://yoursite.com | head -n 1
This command will run according to the cron schedule above.

Implementation Examples

Here are code examples for implementing this cron job in different programming languages:
Unix/Linux Crontab
*/5 * * * * /path/to/script.sh
Python (with schedule library)
schedule.every(5).minutes.do(job)
Node.js (with node-cron)
cron.schedule('*/5 * * * *', () => {
  console.log('Running every 5 minutes');
});
Go (with robfig/cron)
c.AddFunc("*/5 * * * *", func() { fmt.Println("Run every 5 mins") })
GitHub Actions Workflow
- cron: "*/5 * * * *"

Related Cron Recipes

Automate PostgreSQL Backups Daily

How to schedule a daily PostgreSQL database backup using cron.
databasepostgresbackup

Automate MySQL Backups Daily

Schedule a daily MySQL database dump using cron.
databasemysqlbackup

Automate MongoDB Backups Daily

How to schedule a daily MongoDB backup using cron.
databasemongodbbackup

Automate Redis RDB Snapshots

Schedule a Redis background save (snapshot) via cron.
databaserediscache

PostgreSQL Vacuum Analyze

Automate PostgreSQL database maintenance with VACUUM ANALYZE.
databasepostgresmaintenance

Sync Folder to AWS S3

Cron job to sync local files to an AWS S3 bucket.
awscloudbackup