This script is used to receive email notifications when your account has books ready for pickup, books in transit (almost ready for pickup), overdue books, or books that are due back soon.
- You will need to have git installed, or download the file and unzip from github
- node installed
- npm installed
- a Zoho email account
-
Clone this repo with git, or download the files and unzip them. You can clone this repo in terminal by typing
git clone https://github.com/TimWallaceDev/toronto-public-library-notifications
-
Switch into this directory. In the terminal type
cd toronto-public-library-notifications
-
In the terminal, install the required packages. You can accomplish this by typing
npm i
-
rename the .envSample to .env and add your credentials
-
You can select which checks you would like in the .env by changing the values from false to true.
-
If on linux, open the crontab using
crontab -e
-
Add a new line to the cron tab to schedule your JavaScript script to run. You'll use Node.js to execute the script. The format for the cron job is as follows:
minute hour * * * node /path/to/your/script/index.js
-
Save and exit the cron tab editor.