March 20

Setup a Simple CRON Job in cPanel To Keep an Eye On Your Website & Warn Yo If It’s Down 24/7

0  comments

How to Setup a CRON Job in cPanel Tha will Check Every 30 Minutes to Ensure  Your Website Is Active. And If It’s no, send you an email to let you know.

Here’s an example CRON job script that you can use in your cPanel hosting to check your websites’ availability every 30 minutes and notify you via email if one, or any of your sites are offline:

  1. Log in to your cPanel account.
  2. Go to the “Cron Jobs” section and click on “Create a Cron Job”.
  3. In the “Common Settings” dropdown menu, select “Every 30 minutes”.
  4. In the “Command” field, paste the following script:

wget -q –spider https://your-website-url.com || echo “Website is down: https://your-website-url.com” | mail -s “Website down” your-email-address@example.com

Obviousely you need to replace https://your-website-url.com with the URL of the website you want to monitor. And replace your-email-address@example.com with your email address where you want to receive notifications.

Click on “Add New Cron Job” to save the changes.

This script uses the wget command to check if your website is accessible, and if it’s not, it sends an email notification to your specified email address.

You can repeat steps 2 onwards to add more cron jobs for your other websites.

Now you can relax,

PS. This  script was written in March or 2023 so if you are viewing this a year or two after this was published, please check with your hosting provider whether this process is still good to use.

Your hosting & cpanel account are your responsibility and this information is here to help but should not be used without prior testing to ensure compatibility with your setup.

You stuff is your responsibility.

 

 


Tags

how to check is your website is still active using a CRON job, simple cron job for website checking, website up cron job checker


You may also like

Page [tcb_pagination_current_page] of [tcb_pagination_total_pages]

Leave a Reply

Your email address will not be published. Required fields are marked *

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get in touch

Name*
Email*
Message
0 of 350