0

I have a file which looks like: df: Month Product Start_Date End_Date Updated_on 0 January Beverage 01/01/2020 01/31/2020 02/06/2020 1 February Beverage 02/01/2020 02/29/2020 03/06/2020 2 March Beverage 03/01/2020 03/31/2020 04/06/2020 3 April Beverage 04/01/2020 04/30/2020 05/06/2020 4 May Beverage 05/01/2020 05/31/2020 06/06/2020

How can i trigger my python script on a particular date? for example i need to update my file on every month 6th, my python script should automatically runs on that day to get the output df as shown in below and so on for other months.

Output df : Month Product Start_Date End_Date Updated_on 0 January Beverage 01/01/2020 01/31/2020 02/06/2020 1 February Beverage 02/01/2020 02/29/2020 03/06/2020 2 March Beverage 03/01/2020 03/31/2020 04/06/2020 3 April Beverage 04/01/2020 04/30/2020 05/06/2020 4 May Beverage 05/01/2020 05/31/2020 06/06/2020 5 June Beverage 06/01/2020 06/30/2020 07/06/2020

harsh
  • 21
  • 4
  • Does this answer your question? [How do I get a Cron like scheduler in Python?](https://stackoverflow.com/questions/373335/how-do-i-get-a-cron-like-scheduler-in-python) – jkortner Jun 29 '20 at 09:41

1 Answers1

1

I'm pretty sure the easiest solution is daemons. Depending on your operating system you would need to use daemons like cron on Linux or Task scheduler on windows, there might be some analogies but those I'm familiar with. Those are tools which schedule certain tasks depending on time criteria and not only.

https://opensource.com/article/17/11/how-use-cron-linux https://www.windowscentral.com/how-create-automated-task-using-task-scheduler-windows-10

Nikolai Savulkin
  • 697
  • 5
  • 12