Scheduling Scripts
Automate the boring things using the schedulers on your computers!
In this edition of the Programming Cafe, we familiarized ourselves with the schedulers available on our operating systems. Windows Task Scheduler & cron
. We learnt how we could use these schedulers to automate the execution of scripts. We also touched upon scheduling cron
jobs with GitHub Actions.
Slides
Exercise
After the presentation, we invite you to try out the scheduler on your operating system yourself!
We have prepared some R & Python scripts that you can utilize for this. You can download the materials here: exercises.zip.
Don’t forget to unzip the folder to an accessible location on your system.
Windows
Go to
windows/r
and double-click onscheduling-scripts.Rproj
to open RStudio.Open the
countdown.R
script from your Files pane and run the script once to make sure it works.If the script works fine, you can try scheduling it using Windows Task Scheduler.
Go to
windows/python
and double-click oncountdown.py
to open it.Run the script to make sure it works.
If the script works fine, you can try scheduling it using Windows Task Scheduler.
MacOS
Go to
macos/r
and double-click onscheduling-scripts.Rproj
to open RStudio.Open the
countdown.R
script from your Files pane and run the script once to make sure it works.If the script works fine, you can try scheduling it using
cron
.
Go to
macos/python
and double-click oncountdown.py
to open it.Run the script to make sure it works.
If the script works fine, you can try scheduling it using
cron
.
Linux
Go to
linux/r
and double-click onscheduling-scripts.Rproj
to open RStudio.Open the
countdown.R
script from your Files pane and run the script once to make sure it works.If the script works fine, you can try scheduling it using
cron
.
Go to
linux/python
and double-click oncountdown.py
to open it.Run the script to make sure it works.
If the script works fine, you can try scheduling it using
cron
.