Cron command-line utility

Last modified: Thursday June 19th, 2025

CRON allows you to run PHP scripts periodically. There are two ways to add a CRON job.

Option 1:
wget -O /dev/null http://yourdomain.com/file.php

Option 2:
/usr/local/bin/php /home/yourusername/domains/yourdomain.com/public_html/file.php
(make sure there is a space between …/php and /home/..!)

Scripts executed by CRON must use absolute file and directory paths (full path).
Reports on the success or failure of CRON-executed scripts are sent to the main user’s mailbox (e.g., np***** or r******).

Be sure to disable email reporting after CRON is working, as it may otherwise flood your main user’s mailbox and account.
In case of issues, the error explanation can be found in the same report sent to the main user’s mailbox. You can log in to the mailbox via the usual webmail address. Use your control panel username (main user) as the login.

Was this article helpful?
Views: 121

10 Years Beehosting!
Celebrate with 70% OFF + FREE Site Transfer.

Facebook Instagram linkedin
Menu