I have a script in python that takes date as an argument in order to get the event in google agenda using google API calendar at that date. Now my problem is as follows: There are three machines: first one is doing some treatment in order to get a date for some reason, second machine is the server that the two other machines are connected to, third machine is where i have to execute the script python in order to get event of its google calendar.
So my question is how can I do such that for every 5 minutes - the first machine send the date (that means every 5 minutes i get a different date ) and each date I get I have to execute that script python to get the event on that date and send the answer to the first machine (doing it dynamically and the server is in the middle between the two other machines ). In other words, how can I make this process dynamic such that for every 5 minutes the script python has to be executed using for each time a different date and give back the result?
I want to execute the script like this :
python script.py '2017-12-10 10:40:00' #(first time)
python script.py '2017-12-10 10:45:00' #(after 5 minutes)
python script.py '2017-12-10 10:50:00' #(after another 5 minutes)
and so on ....
crontab. You should be able to send current time as argument. For exampleecho `date`echo