Monday, May 4, 2009

Remotely Add Scheduled Tasks (SCHTASKS)

echo off
SCHTASKS /Create /S MachineName /RU administrator /RP password /SC DAILY /MO 1 /TN TaskName /TR C:\batfileorapplocation\name.bat /ST 03:00:00 /SD 01/30/2009
pause

see SCHTASK /? for more information on other uses of SCHTASK

2 comments:

  1. I try to Run command:
    SCHTASKS /Create /S MKT /RU administrator /RP P@ssword /SC DAILY /MO 1 /TN ABC /TR C:\name.bat

    recieve an error:
    Access is denied.

    Pls help me how to fix it

    ReplyDelete
  2. Hello,

    Please ensure that the user account you are logged on as when you run the command is an administrator of the remote machine.

    ReplyDelete