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/rand double-click onscheduling-scripts.Rprojto open RStudio.Open the
countdown.Rscript 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/pythonand double-click oncountdown.pyto 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/rand double-click onscheduling-scripts.Rprojto open RStudio.Open the
countdown.Rscript 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/pythonand double-click oncountdown.pyto 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/rand double-click onscheduling-scripts.Rprojto open RStudio.Open the
countdown.Rscript 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/pythonand double-click oncountdown.pyto open it.Run the script to make sure it works.
If the script works fine, you can try scheduling it using
cron.