-
Notifications
You must be signed in to change notification settings - Fork 0
Automatic execution
In this document, I will synthesize how you can execute this script automatically 😃
In Linux, there is an integrated utility called cron
that lets you schedule jobs to run at fixed times, dates, or intervals.
To learn more about it, here are some valuable resources:
With cron, you can make the racoToNotion script execute every x amount of time (for example, every 20 minutes)
*/20 * * * * <nodejs-directory-in-your-pc> <racoToNotion-script-path>
# <-----------> <---------------------------------------------------->
# time what you want the cronjob to do
# interval
There is a small problem with level 1, which is that you must have your PC on if you want the cronjob to work.
To make the program execute even when your PC is off, you can get a Virtual Machine (VM) in a cloud computing service, such as Google Cloud or AWS and execute the script there with a cronjob. These VMs will be constantly running on the cloud so your program will be on 24/7! 😃
You can get a free VM from Google Cloud as they have a free tier e2-micro VM in which you can execute the script with no problem.
(I personally have the script executing every 20 minutes in a VM I got from Google Cloud with their free trial).