Link to home
Start Free TrialLog in
Avatar of Jweaver57
Jweaver57

asked on

I'm trying to use schtasks.exe to run Backup to CD-RW

I've been trying to use schtasks.exe to run a backup software package to burn a backup of my data on a weekly schedule.  I can't seem to get it to run.  I've even tested it trying to open Outlook express to no luck.  What am I doing wrong.

The script is as follows

schtasks /create /tn weeklybackup /sc weekly /d thu /st 23:00:00 /tr "c:\program files\willow creek software\WCBackupCD.exe" /ub weekly e:\

I've tried moving the tr statement in front of the sc statement.  

help :)
Avatar of Jweaver57
Jweaver57

ASKER

When I test it, I get   Sucess:  Attempted to run the scheduled task " weeklybackup".    That's it.  Nothing happens.  The logs show  
"weeklybackup.job" (program) 12/2/2003 12:47:50 PM ** ERROR **
      Unable to start task.
      The specific error is:
      0x80070002: The system cannot find the file specified.
      Try using the Task page Browse button to locate the application.
[ ***** Most recent entry is above this line ***** ]
hmm.. try renaming the folder "Willow creek software" something without space, say "wcreeksw"
Also, make sure that you are running the task with the appropriate credentials.  I had this problem with my backups and banged my head against a wall for hours until I discovered that it was set up with the wrong user account.  (Not by me...:)

Note:  the error indicated does not make me think this is the case though.  hmmmmmm

FE
When I run "c:\program files\willow creek software\wcbackupcd.exe" /ub weekly e:\
from the command line it runs just fine.  I must be missing something.  
Try creating the scheduled task through the GUI instead of the command line...
I figured it out.  After creating the task in "schtasks.exe", I went to the Windows Scheduled Tasks applet and opened the scheduled event.  I then modified the "Start in" box to reflect the full path of willow creek software and removed everthing in the "Run" box leaving just the executable.  When applying the changes here it asked to confirm the password to run as again.  I supplied the same password and ran the test from the Windows "Scheduled Tasks" applet and it worked.

Maybe this is what I should have been doing from the beginning but the documentation I used from Windows help didn't explain it that way.    
good idea Jfrederick...
I don't know why but I tried creating the task from the Windows Scheduler applet many times and it didn't work.  Only after I did a combination, as I mentioned last did it work.  

OK,  so what is the right thing to do about awarding points?  
Just glad to see that you resolved the problem.  

FE
Avatar of LeeTutor
Glad you got the problem fixed.  Sounds like you fixed it yourself.  You should click on the link for Community Support on the left side of the page (if you're using the oldlook user interface for Experts Exchange) or click on the button labeled CS at the top righthand side of the page (for the new look), and post a zero point question to have this question deleted so your points can be returned to you.  Make sure to include the reason for the deletion and the url of this question in your Community Support question.
ASKER CERTIFIED SOLUTION
Avatar of SpazMODic
SpazMODic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial