0

I have written a script to read and write in excel.

Now looking to run this script in every 15 minutes periodically.

Is there any one who can modify the code with time scheduler.

Here is the script:

http://prntscr.com/eow5cy

Thanks, Dharmendra

DKM
  • 1,761
  • 2
  • 19
  • 34

2 Answers2

1

If you're on a *nix based operating system you can use cronjob. On windows you'd want to use a scheduled task.

To setup the cronjob it would be something like:

crontab -e

Edit this file to include the call to your script:

*/15 * *  python /home/useraccount/dev/yourpythonscript.py

This will make run every 15 minutes, every hour, every day, every month.

Jim Factor
  • 1,465
  • 1
  • 15
  • 24
0

You can use the module time module.

Use function time.sleep (<seconds>)

Check this out. https://stackoverflow.com/a/510351/1150428

Community
  • 1
  • 1
Vigneshwaren
  • 1,273
  • 2
  • 15
  • 24