Skip to content

Commit

Permalink
Add crons
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineleclair committed Jun 23, 2024
1 parent 00e4210 commit 17906a9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/deployment-guides/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"label": "Deployment Guides",
"position": 3,
"collapsible": false,
"collapsed": false,
"collapsed": false
}
6 changes: 6 additions & 0 deletions docs/exhaustive-documentation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "Exhaustive Documentation",
"position": 4,
"collapsible": false,
"collapsed": false
}
53 changes: 53 additions & 0 deletions docs/exhaustive-documentation/crons.md
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
```
2 changes: 1 addition & 1 deletion docs/get-started/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"label": "Get Started",
"position": 2,
"collapsible": false,
"collapsed": false,
"collapsed": false
}

0 comments on commit 17906a9

Please sign in to comment.