Creating a Scheduled task

(imported topic written by packman73)

I’m attempting to create a scheduled task through BigFix and I’m not having much luck. I need it to read the configuration via an XML file as the command line options for schtasks.exe are limited. Below are the two commands that I’m’ running in my script. The first one works, the second one doesn’t. However, when I run the second command from the endpoint locally, it works. Thoughts?

waithidden cmd.exe /C schtasks /create /tn “Site Backup Test” /sc WEEKLY /mo 2 /D SUN /st 02:30:00 /ru “System” /tr “C:\windows\system32\notepad.exe”

waithidden cmd.exe /C schtasks /create /tn “Site Backup” /XML C:\Tech\SiteBackup.xml

(imported comment written by Mark_Macherey)

waithidden cmd.exe /C schtasks /create /tn “Site Backup” /XML C:\SiteBackup.xml

works fine for me, you may want to try a /F switch, the issue may be your .XML file ?

I ran the first command and then exported the task to C:\SiteBackup.xml and then ran the second command