Skip to content

10. Add cron job for automatically renew subscription

ninacoder-info edited this page Sep 22, 2020 · 1 revision

Music Engine is required a cron job to run in for for automatically renew subscription. Just add this line below into your cron system.

* * * * * php /path-to-music-engine/artisan schedule:run >> /dev/null 2>&1

Example for cPanel hosting:

***Step 1 Log in to cPanel, scroll down to the Advanced section and click the Cron Jobs icon.

Cron Jobs Icon

***Step 2 Scroll down to the Add New Cron Job section. You can either select from the Common Settings drop down menus or fill out your own custom values. Fill out the form as follows:

Common Settings: This option allows you to select a preset interval for your cron job to run. If you have not chosen one of the preset Common Settings, choose from the other options:

Minute: Either enter a custom value or select a preset value from the Common Settings menu. Hour: Either enter a custom value or select a preset value from the Common Settings menu. Day: Either enter a custom value or select a preset value from the Common Settings menu. Month: Either enter a custom value or select a preset value from the Common Settings menu. Weekday: Either enter a custom value or select a preset value from the Common Settings menu. The following example shows a job set up to run twice daily.

***Step 3 Enter the command you want to run:

For music engine is php /path-to-music-engine/artisan schedule:run in the Command field and click Add New Cron Job.

The command can be any command able to be run from the Linux terminal. This includes scripts per our example.

Add New Cron Jobs Button

A confirmation will appear to confirm that the job has been added.