Search code examples
pythonpython-2.7scheduleradministrationat-job

Running python scripts using Windows AT command line prompt


The question is: How should exactly look the AT command to schedule a one-time task to be executed by python. Here is what I tried:

at 20.00 "cmd python e:/path/to/file/script.py"
at 20.00 c:/Python27/python.exe e:/path/to/file/script.py

Neither is working, please advice. Command line example is required, can't use Scheduler Wizard on this one.


Solution

  • From the docs

    time: Use this parameter to specify the time when the task is to run. Time is specified as hours:minutes based on the 24-hour clock. For example, 0:00 represents midnight and 20:30 represents 8:30 P.M.

    So the time format you're using 20.00 is incorrect, and should be 20:00.