1

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

1
  • Although your question contains code, it's not really programming related since it's more how to use a feature of Windows. Nudging this across to SU where you'll get a more targeted response. Commented May 12, 2010 at 3:19

1 Answer 1

2

Not sure how to do it properly through the GUI, but see here for a nice solution involving the schtasks command.

Sign up to request clarification or add additional context in comments.

2 Comments

Just realized you asked the same question and got the same answer last month. Did the command not work?
It pointed me in the right direction - use the GUI - but the GUI isn't so straight forward.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.