This program is designed to automate the process of scheduling appointments at the corec. Depending on how the cronjob is set up, the automation can occur hourly, daily, weekly, or at any desired time interval. The usage for linux is summarized below.
- Download scheduler.py from the repo. Ensure "imageio" and "selenium" are installed. Place the path to python at the top of the file. The CL arguments for the script are as follows:
- username: Purdue Login
- password: Duo Password (ex. ####,push)
- tries: Number of Times to Attempt Login; default=4
- pathToChromeDriver: path/to/chromedriver
- d: Display Options; default=None; "headless" hides chromedriver from launching
- timeSlot: Desired Time Slot to Schedule (ex. "9:20 - 10:40 AM"); ensure it matches the format on the Purdue Recwell website
- Download Google Chromedriver.
- Open terminal:
launchctl start /System/Library/LaunchDaemons/com.vix.cron.plist
to launch cron.chmod a+x path/to/scheduler.py
to instanstiate permissions.crontab -e
to edit cron file.- Use VIM to edit the file and enter:
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
PYTHONPATH=path/to/lib/python3.8/site-packages
MAILTO=youremail@gmail.com
* * * * * python3 path/to/scheduler.py --username yourUsername --password yourPassword --tries numTries --pathToChromeDriver path/to/chromedriver --d headless --timeSlot "your desired timeslot"
Be sure to enter the appropriate cron expression for the desired frequency (ex. "30 12 * * *" will run the script daily at 12:30). Refer to these crontab resources.
- Done!