Adding a Cron Job in Vesta Hosting Panel

Many website scripts require cron jobs to perform tasks at set intervals. It is very easy to add a cron job via the Vesta hosting panel. This guide will walk you through the steps.

To add a cron job login to your web hosting panel with the admin user.

Warning: Do not suspend/delete or make changes in the system cron. You need to “login as your webuser” to add your cron for your site.

1. Navigate to

user > yourwebuser > login as (webuser) > cron

2. Click the green + symbol to add a new cron job.

3. Add the command your script providers gave you.

The full path of your app should be

/home/your_username/web/your_domain.com/public_html/

Example command:
php /home/myuser/web/domain.com/public_html/cron.php

4. You will need to set the minute, hour, day, month, and day of week. You can easily set these by clicking the drop down selection on the right, click “generate” and it will auto-fill the fields. You can also manually fill in the details as below:

  • min (0 – 59)
  • hour (0 – 23)
  • day of month (1 – 31)
  • month (1 – 12)
  • day of week (0 – 6) (where 0 is Sunday and 6 is Saturday)

Example Time:

Every minute = * * * * *
Every hour at 15 minute = 15 * * * *
Every day at 11:15pm = 15 23 * * *
Every 4 hours at 5 minute = 5 */4 * * *
Every 15th of the month = 0 0 15 * *
Every Sunday of the week = 0 0 * * 0

 

%d bloggers like this: