From 17906a9d7cde7305638260bb4e787484b942151f Mon Sep 17 00:00:00 2001 From: Antoine Leclair Date: Sun, 23 Jun 2024 15:07:08 -0400 Subject: [PATCH] Add crons --- docs/deployment-guides/_category_.json | 2 +- docs/exhaustive-documentation/_category_.json | 6 +++ docs/exhaustive-documentation/crons.md | 53 +++++++++++++++++++ docs/get-started/_category_.json | 2 +- 4 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 docs/exhaustive-documentation/_category_.json create mode 100644 docs/exhaustive-documentation/crons.md diff --git a/docs/deployment-guides/_category_.json b/docs/deployment-guides/_category_.json index 2b033a5..1e69705 100644 --- a/docs/deployment-guides/_category_.json +++ b/docs/deployment-guides/_category_.json @@ -2,5 +2,5 @@ "label": "Deployment Guides", "position": 3, "collapsible": false, - "collapsed": false, + "collapsed": false } diff --git a/docs/exhaustive-documentation/_category_.json b/docs/exhaustive-documentation/_category_.json new file mode 100644 index 0000000..08b6d5d --- /dev/null +++ b/docs/exhaustive-documentation/_category_.json @@ -0,0 +1,6 @@ +{ + "label": "Exhaustive Documentation", + "position": 4, + "collapsible": false, + "collapsed": false +} diff --git a/docs/exhaustive-documentation/crons.md b/docs/exhaustive-documentation/crons.md new file mode 100644 index 0000000..73dcbce --- /dev/null +++ b/docs/exhaustive-documentation/crons.md @@ -0,0 +1,53 @@ +--- +sidebar_position: 1 +--- + +# Crons + +You can specify crons in your `disco.json` file: +```json +{ + "version": "1.0", + "services": { + "web": { + "port": 8080, + "command": "./bin/serve.sh" + }, + "mycron": { + "type": "cron", + "schedule": "0 * * * *", + "command": "./bin/crons/hour.sh" + } + } +} +``` + +## Basic Examples + +Here are a few basic examples of `crontab` notation to get you started: +```json +{ + "version": "1.0", + "services": { + "web": { + "port": 8080, + "command": "./bin/serve.sh" + }, + "minutecron": { + "type": "cron", + "schedule": "* * * * *", + "command": "./bin/cron/oneminute.sh" + }, + "hourcron": { + "type": "cron", + "schedule": "0 * * * *", + "command": "./bin/cron/onehour.sh" + }, + "daycron": { + "type": "cron", + "schedule": "0 0 * * *", + "command": "./bin/cron/oneday.sh" + } + } +} +``` diff --git a/docs/get-started/_category_.json b/docs/get-started/_category_.json index bd4963a..84d1369 100644 --- a/docs/get-started/_category_.json +++ b/docs/get-started/_category_.json @@ -2,5 +2,5 @@ "label": "Get Started", "position": 2, "collapsible": false, - "collapsed": false, + "collapsed": false }