Problem with "Add Scheduled task"

 

I'm trying to have a FinalBuilder script set up a scheduled task to run another FinalBuilder script every 20 minutes, but I keep getting this error:

 

Command line : schtasks /Create /TN "FinalBuilder5 - testing task" /RU CORP\rc /RP ****** /SC MINUTE /MO 5 /TR "C:\Program Files\FinalBuilder 5\FBCMD.exe" /o /p"C:\p4_rc\depot\projects\inyo\scm\devel\sched_test.fbp5" /ST 15:40:00
ERROR: Invalid Argument/Option - '/o'.
Type "SCHTASKS /CREATE /?" for usage.
Action Failed
C:\WINDOWS\system32\schtasks.exe returned : 1

 

For my Task Executable I'm using: "C:\Program Files\FinalBuilder 5\FBCMD.exe"

For my Command Line Parameters: /o /p"C:\p4_rc\depot\projects\inyo\scm\devel\sched_test.fbp5"

The problem seems to be that schtasks is thinking the /o is a parameter to schtasks and not to FBCMD.  Am I doing something wrong?

Thanks,

   Keith

 

 

From a bit of testing, it seems possible to do what you want if you set the quotes correctly.
Perhaps somethnig like this:
schtasks /Create /TN “FinalBuilder5 - testing task” /RU CORP\rc /RP ****** /SC MINUTE /MO 5 /TR “C:\Program Files\FinalBuilder 5\FBCMD.exe /o /pC:\p4_rc\depot\projects\inyo\scm\devel\sched_test.fbp5” /ST 15:40:00

Or even:

schtasks /Create /TN “FinalBuilder5 - testing task” /RU CORP\rc /RP ****** /SC MINUTE /MO 5 /TR “C:\Program Files\FinalBuilder 5\FBCMD.exe /o /p”“C:\p4_rc\depot\projects\inyo\scm\devel\sched_test.fbp5"” /ST 15:40:00

If that gets too complicated, try creating a batch file with the fbcmd call, and simply call that: /tr “c:\builds\build1.bat”

Finally, don’t forget that FinalBuilder has support for the windows scheduler directly from the Tools menu - you don’t really need to be calling the scheduler from the command line in most cases.

Steve

Hi Keith,

Sorry for the delay in getting back to you. Thanks for the extra support info, Steve.

There was a bug quoting the arguments to schtasks, but it’s been fixed in the latest test build. Here’s a download link:

https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_375.exe

Regards,

Angus

Sorry to take so long getting back to you, too Angus. I've finally had a chance to try out your build and it works nicely. Thanks!

  Keith