From 93ec724f3015bcba3c0cb1924abc12a1c74bc059 Mon Sep 17 00:00:00 2001 From: Rui Carmo Date: Sun, 7 Mar 2021 19:48:47 +0000 Subject: [PATCH] Update DESIGN.md --- docs/DESIGN.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 29d2b8d..ea7b37b 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -16,11 +16,12 @@ An app is simply a `git` repository with some additional files on the top level, ### `Procfile` format -`piku` recognizes three kinds of process declarations in the `Procfile`: +`piku` recognizes five kinds of process declarations in the `Procfile`: * `wsgi` workers, in the format `dotted.module:entry_point` (Python-only) * `web` workers, which can be anything that honors the `PORT` environment variable * `static` workers, which simply mount the first argument as the root static path +* `cron` workers, which require a simplified `cron` expression preceding the command to be run (e.g. `cron: */5 * * * * python batch.py` to run a batch every 5 minutes) * `worker` processes, which are standalone workers and can have arbitrary names So a Python application could have a `Procfile` like such: @@ -29,6 +30,8 @@ So a Python application could have a `Procfile` like such: wsgi: module.submodule:app worker: python long_running_script.py fetcher: python fetcher.py +# Simple cron expression: minute [0-59], hour [0-23], day [0-31], month [1-12], weekday [1-7] (starting Monday, no ranges allowed on any field) +cron: 0 0 * * * python midnight_cleanup.py ``` ...whereas a generic app would be: