Update scheduled-cron-tasks.md

This commit is contained in:
Ben Katz authored and GitHub committed 2024-08-26 20:53:32 +07:00
1 parent 8e2b4dc688
commit 04a5818d21
1 file changed
+3
+3
View File
@@ -16,6 +16,9 @@ cron:set [--global|<app>] <key> <value> # Set or clear a cron property for an ap
Dokku automates scheduled `dokku run` commands via it's `app.json` cron integration. Dokku automates scheduled `dokku run` commands via it's `app.json` cron integration.
> [!IMPORTANT]
> In order for Dokku to run scheduled cron tasks, you must have the `crontab` utility installed on the machine Dokku runs on. On Debian-based systems, you can install it with `sudo apt install cron`.
#### Specifying commands #### Specifying commands
The `app.json` file for a given app can define a special `cron` key that contains a list of commands to run on given schedules. The following is a simple example `app.json` that effectively runs the command `dokku run $APP npm run send-email` once a day: The `app.json` file for a given app can define a special `cron` key that contains a list of commands to run on given schedules. The following is a simple example `app.json` that effectively runs the command `dokku run $APP npm run send-email` once a day: