Home Website Tools & Features Setting Up Automated Tasks (Cron Jobs)

Setting Up Automated Tasks (Cron Jobs)

Last updated on Apr 30, 2025

Cron jobs allow you to schedule scripts or commands to run automatically on your hosting account β€” for example, to trigger backups, send scheduled emails, or refresh data.

If your website or application relies on regular background tasks, setting up a cron job ensures these tasks run reliably without manual intervention.


πŸ” First: Access Your Hosting Control Panel

If you’re not already logged in, follow this guide:
πŸ‘‰ How to Access Your Web Hosting Control Panel

Once logged in, look for the Cron Jobs section.


βž• Creating a Cron Job

  1. In the control panel, click on Cron Jobs

  2. Under Add New Cron Job, configure the following:

⏲ Schedule

You can manually enter values or use the dropdown presets. Each field defines when your script runs:

  • Minute (0–59)

  • Hour (0–23)

  • Day (1–31)

  • Month (1–12)

  • Weekday (0–6, where 0 = Sunday)

For example, to run a task every day at 3am:

  • Minute: 0

  • Hour: 3

  • Day: *

  • Month: *

  • Weekday: *

Or use the preset dropdown for quick options like:

  • Once per day

  • Once per hour

  • Once per week


πŸ’» Command to Run

This is the actual command or script you want to run. Common examples:

PHP Script:

/usr/local/bin/php /home/yourusername/domains/yourdomain.com/public_html/cron.php

Wget (URL-based script):

/usr/bin/wget -q -O /dev/null https://yourdomain.com/cron.php

Curl (alternative to wget):

/usr/bin/curl -s https://yourdomain.com/cron.php > /dev/null

Make sure your script is:

  • Executable

  • Correctly located in your file structure

  • Capable of running in a non-browser environment (i.e., command line)


πŸ§ͺ Testing a Cron Job

  • You can run the script manually via File Manager or a browser to confirm it works

  • After saving the job, wait for the scheduled time to see if it executes

  • For debugging, consider adding output to a log file:

/usr/local/bin/php /home/yourusername/domains/yourdomain.com/public_html/cron.php >> /home/yourusername/cronlog.txt 2>&1


πŸ“Œ Managing Existing Cron Jobs

  • All saved cron jobs appear in a list below the form

  • You can Edit or Delete any cron job at any time

  • Review them periodically to remove unused or outdated jobs


πŸ›‘ Security Tip

If you're triggering cron jobs using a public URL (e.g. cron.php), consider:

  • Adding a secret token in the URL

  • Blocking public access to the script via .htaccess or IP restriction