Windows 7 Task Scheduler
Posted
by Btibert3
on Stack Overflow
See other posts from Stack Overflow
or by Btibert3
Published on 2010-05-12T02:32:05Z
Indexed on
2010/05/12
2:44 UTC
Read the original article
Hit count: 398
python
|scheduled-tasks
Hi All,
Very new to this, and I have no idea where to start.
I want to schedule a python script using Task Scheduler in Windows 7. When I add a "New Action", I place the following command as the script/program :
c:\python25\python.exe
As the argument, I add the full path to the location of my python script
path\script.py
Here is my script:
import datetime
import csv
import os
now = datetime.datetime.now()
print str(now)
os.chdir('C:/Users/Brock/Desktop/')
print os.getcwd()
writer = csv.writer(open("test task.csv", "wb"))
row = ('This is a test', str(now))
writer.writerow(row)
I got an error saying the script could not run. Any help you can provide to get me up and running will be very much appreciated!
Thanks,
Brock
© Stack Overflow or respective owner