From 6d7a02d68e8d0b904dcf1ff82f4583901ba5933e Mon Sep 17 00:00:00 2001 From: Niraj Thapaliya Date: Thu, 12 Nov 2020 14:44:07 -0600 Subject: [PATCH 1/2] Update README.md for first time users --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 4111ef6..639989b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ # api_client_python Some examples to show how to interact with the OfficeSpace API using Python + +# Prerequisites + +## External libraries +This script depends on the python library `requests` to work. Make sure +it is installed before running. + +A quick way install `requests` if it isn't yet: +```bash +sudo easy_install pip +sudo pip install --upgrade pip +pip install requests +``` From bba002a86f19a93b81b8ff4bb52ab5e7da4b15f3 Mon Sep 17 00:00:00 2001 From: Niraj Thapaliya Date: Tue, 26 Jan 2021 12:04:09 -0600 Subject: [PATCH 2/2] Add basic cron instructions --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 639989b..8b445e4 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,18 @@ sudo easy_install pip sudo pip install --upgrade pip pip install requests ``` + +## Optional: Scheduling via `crontab` + +If you wish to schedule the script to run at specific intervals, +you have to set up a cron job. + +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 * * * *". + Use https://crontab.guru/ as reference. +2) Run `crontab -e` to edit the cron file. +3) Put in a new line: ` ` + For example, a new line could be `30 * * * * /usr/bin/python /Users/johndoe/projects/bamboo_to_officespace.py` + Save the file and exit the editor. +4) `crontab -l` to check if the new settings apply. You should see the latest task in the list.