2

I have a test.py file that I execute in my terminal with

 python test.py

what I would like to do is to have this file automatically execute at 1:00 am everyday. How can I implement this?

e.iluf
  • 1,389
  • 5
  • 27
  • 69

2 Answers2

2

If you are using linux you can have a look about at to execute at a specific time.

you can also use watch

But maybe crontab is better in this case.

Dadep
  • 2,796
  • 5
  • 27
  • 40
1

crontab is better option for this use case. You can add your command in cron job using following command. It will execute your python script at 1:00am every day.

crontab -e

write following lines :

00 01 * * * python /path/to/python/script
Dadep
  • 2,796
  • 5
  • 27
  • 40
P.Madhukar
  • 454
  • 3
  • 12