CronJobs

Introduction

Vito makes managing CronJobs painless! It interacts directly with your server's crontab and deploys your CronJobs there.

You can Create, Delete, Enable and Disable CronJobs.

Create a new Cronjob

Simply navigate to the Cronjobs and create a new cronjob by clicking the Create button and fill the following fields.

Command

This is the command that will be executed on each cron execution. Depending on the user that will run the cron, It will run from the home directory of that user.

If the user is vito then the command will be executed on /home/vito. We recommend to use the absolute path for your commands in the cronjobs.

For example, To run Laravel's scheduler you can use the following command:

SWIFT
php /home/vito/your-domain/artisan schedule:run >> /dev/null 2>&1

Do not add any frequency (* * * * *) to the command because VitoDeploy will add it when deploying the cronjob.

User

The cronjob command will be executed by this user, which will include any tooling that the user has enabled. root and vito users will not have access to tooling installed per site. It's recommended, unless absolutely nessisary, to run the command as the user of the site it's running against.

Frequency

This is the part you will provide the frequency and then VitoDeploy will attach it to the command when deploying the cronjob.

Delete Cronjob

To delete a cronjob you can just hit the delete icon (trash) and confirm that you want to delete the cronjob.

Enable/Disable Cronjob

VitoDeploy allows you to enable/disable a cronjob.

A disabled cronjob will not execute on the given frequency.

Sync Cronjobs

If you've added cronjobs manually on the server (for example by editing the crontab directly), you can pull them into Vito with the Sync button on the Cronjobs page. Vito reads the server's crontab and imports any cronjobs that aren't already tracked.