Skip to content

Commit f176cc9

Browse files
committed
Add basic cron instructions
1 parent 6d7a02d commit f176cc9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@ sudo easy_install pip
1313
sudo pip install --upgrade pip
1414
pip install requests
1515
```
16+
17+
## Optional: Scheduling via `crontab`
18+
19+
If you wish to schedule the script to run at specific intervals,
20+
you have to set up a cron job.
21+
22+
1) Decide the frequency at which you want to run the script and note the cron expression for it. For example, if you want to run it every hour, the cron expression would look like "0 * * * *".
23+
Use https://crontab.guru/ as reference.
24+
2) Run `crontab -e` to edit the cron file.
25+
3) Put in a new line: `<crontab expression> <full path to python> <full path to script>`
26+
For example, a new line could be `30 * * * * /usr/bin/python /Users/johndoe/projects/bamboo_to_officespace.py`
27+
Save the file and exit the editor.
28+
4) `crontab -l` to check if the new settings apply. You should see the latest task in the list.

0 commit comments

Comments
 (0)