Run a script or URL automatically on a schedule, with ready-made command examples.
A cron job runs a command automatically on a schedule, for example a nightly import, sending queued emails or running WordPress's scheduled tasks reliably. How many cron jobs you can create depends on your plan.
Creating a cron job
- Sign in to HostPanel and go to Tools → Cron Jobs.
- Create a new job and choose the Domain it belongs to. The insert-path helper can fill in your website's folder for you.
- Give it a Task name.
- Enter the Command (examples below).
- Choose a Schedule: a preset such as every 5 minutes, hourly or daily at 2am, or switch to Advanced to enter the minute, hour, day, month and weekday yourself.
- Save.
You can also manage cron jobs on the Cron Jobs tab of your hosting in the client area.
Command examples
Replace USERNAME and example.com with your own.
# Run a PHP script php /home/USERNAME/example.com/public_html/cron.php # Open a web address curl -s https://example.com/cron/run > /dev/null # Run WordPress's scheduled tasks cd /home/USERNAME/example.com/public_html && wp cron event run --due-now # Laravel scheduler (every minute) cd /home/USERNAME/example.com && php artisan schedule:run
Checking that it works
- Click Run now to test the job straight away.
- Click View logs to see each run's output, exit code and duration.
- Jobs that fail three or more times in 24 hours are highlighted. Check their logs.
Use the switch to pause a job, and delete jobs you no longer need.
For security, cron jobs can only run your own files and common tools such as PHP, Python, Node, curl, wp and composer.