Free .co.zw domain with annual hosting View hosting plans
WhatsApp +263 78 377 1089 JomeTech Africa, 163 Chinhoyi Street, Corner Chinhoyi Street and Nelson Mandela Avenue, Harare
Server status Support Client login
JomeTech Hosting: Fast, Secure, Always Online
Free .co.zw domain for the first year with annual hosting View Plans →

How to schedule tasks with cron jobs in cPanel Print

  • 0

A cron job runs a command for you on a schedule, for example a nightly backup script or a task that sends reminder emails.

Create a cron job

  1. Log in to cPanel and open Cron Jobs under Advanced.
  2. Under Cron Email, enter an address if you want to receive the output each time the job runs.
  3. Under Add New Cron Job, pick a schedule from Common Settings, such as "Once Per Day".
  4. Enter the command and click Add New Cron Job.

Command examples

Replace username with your cPanel username.

/usr/local/bin/php /home/username/public_html/script.php
wget -q -O /dev/null https://yourdomain.co.zw/wp-cron.php

Timing examples

  • 0 3 * * * runs every day at 03:00.
  • */15 * * * * runs every 15 minutes.
  • 0 8 * * 1 runs every Monday at 08:00.

Tips

  • Run the command by hand first to make sure the script works.
  • On shared hosting, avoid running jobs every minute. Every 15 minutes or longer is kinder to your resource limits.
  • To stop the output emails, add >/dev/null 2>&1 to the end of the command.
  • The server clock may not be on Harare time. Check the time shown on the Cron Jobs page before you set an hour.

Related guides

Need a hand?

WhatsApp us on +263 78 377 1089, email support@jometechafrica.com or open a support ticket. Our Harare team is available Monday to Friday, 08:00 to 17:00, and Saturday, 08:00 to 13:00.


Was this answer helpful?

« Back

Chat with us