This guide shows you how to set up cron jobs on your HOSTDOG hosting account. You will learn how to create scheduled tasks through your control panel, write cron expressions for common intervals, and troubleshoot jobs that do not run as expected.
What you will need
- An active HOSTDOG hosting account
- Access to your hosting control panel (how to log in)
- The script or command you want to schedule
Create a cron job
Navigate to the HOSTDOG homepage and click the Log in button in the top-right corner. From your client area, go to your hosting service and click Login to Control Panel.
In the Advanced section of your control panel, click Cron Jobs.
Use the Common Settings dropdown to select a preset interval (e.g., once per hour, once per day, once per week), or enter custom values in the five timing fields:
| Field | Range | Description |
|---|---|---|
| Minute | 0–59 | Minute of the hour |
| Hour | 0–23 | Hour of the day (24-hour format) |
| Day | 1–31 | Day of the month |
| Month | 1–12 | Month of the year |
| Weekday | 0–6 | Day of the week (0 = Sunday) |
Use * for "every" (e.g., * in the Hour field means every hour).
In the Command field, type the full command you want to run. Always use absolute paths. Common examples:
| Task | Command |
|---|---|
| Run a PHP script | /usr/local/bin/php /home/yourusername/public_html/cron.php |
| WordPress cron | /usr/local/bin/php /home/yourusername/public_html/wp-cron.php |
| Fetch a URL | /usr/bin/curl -s https://yourdomain.com/cron-endpoint > /dev/null 2>&1 |
| Run a shell script | /bin/bash /home/yourusername/scripts/cleanup.sh |
> /dev/null 2>&1 to the end of your command to suppress email notifications for successful runs. Without this, the system sends an email to your account for every execution.
Click Add New Cron Job. The job appears in the list of current cron jobs below. You can edit or delete it at any time.
Common cron schedules
| Schedule | Expression |
|---|---|
| Every 5 minutes | */5 * * * * |
| Every hour | 0 * * * * |
| Every day at 03:00 | 0 3 * * * |
| Every Monday at 06:00 | 0 6 * * 1 |
| First day of every month | 0 0 1 * * |
Troubleshooting
The most common cause is an incorrect path. Use absolute paths for both the interpreter and the script. Test the command manually via SSH first to make sure it executes without errors. Also verify that the script has the correct file permissions (chmod 755 for shell scripts).
By default, the system emails the output of every cron execution to your account's email address. Append > /dev/null 2>&1 to your command to discard all output. Alternatively, redirect output to a log file: > /home/yourusername/cron.log 2>&1.
The default /usr/local/bin/php may not match the PHP version you set in PHP Selector. To use a specific version, use the versioned binary path, for example: /usr/local/bin/ea-php82 /home/yourusername/public_html/cron.php. Check available PHP binaries via SSH with ls /usr/local/bin/ea-php*. [VERIFY — exact path may differ on HOSTDOG servers]