schtasks


Can't get schtasks.exe to work in Windows 7

I have a functioning command in Windows XP to schedule a task to run every minute with the Windows scheduler. It looks like this:

ASSIGN l-cmd = 'schtasks /Create /SC minute /RU "" /TN "Capture AutoSync" /TR "\"C:\Auto.lnk"'.
OS-COMMAND NO-CONSOLE VALUE(l-cmd).

On Windows 7, I get "The task XML is missing a required element or attribute."

However, the MS example (from their website) shows the following example:

SCHTASKS /Create /S system /U user /P password /RU runasuser
/RP runaspassword
/SC HOURLY /TN rtest1 /TR notepad


Syndicate content