In this how-to, we’ll show how to set up Laravel Artisan Cron Jobs within the Servebolt Control Panel.
Time needed: 2 minutes
Here’s how to set up a Laravel Artisan Cron Job.
- Set up the cron job in the Control Panel
Go to your site’s cron settings page in the Control Panel and enter the following in the time field:
*/10 * * * *
This will make the cron job run once every 10 minutes.
In the command field, enter the following:
php /kunder/user_name/site_user/path/webroot/artisan schedule:run
Don’t copy and paste the above directly. Replace the path with the complete path to your webroot and artisan location. You can find your public path per site in the Control Panel on the main page per site.
Finally, click the “Add” button. Now the cron job has been added!
- Optionally turn off email notifications
You can turn off email notifications by changing the status to active (silent). This can be done by clicking the “Update” button on the bottom of the page after selecting “Do not send email”.
Note: you may still receive emails regarding cron jobs if the cron job that was executed ran into some error. To eliminate these emails you’ll need to fix the underlying errors.