November 2018
Intermediate to advanced
404 pages
10h 16m
English
If you want to run a cronjob, you specify it in the cloud.yml optional file in the root directory of your application. Add the following to cloud.yml:
cronjobs: production: ping: time: "* * * */24 *" command: "ping http://www.vapor.com"
The preceding script specifies the environment to be "production" and the name to be "ping".
The time is specified to be * * * */24 *, per the following format:
* * * * * command to be executed- - - - -| | | | || | | | ----- Day of week (0 - 7) (Sunday=0 or 7)| | | ------- Month (1 - 12)| | --------- Day of month (1 - 31)| ----------- Hour (0 - 23)------------- Minute (0 - 59)This means that the command will be executed once every 24 hours.
The command specifies the full command ...
Read now
Unlock full access