Software >> OS >> Windows >> Command Line >> How to manage and view scheduled tasks

The Microsoft ® Task Scheduler Command Line Utility, jt.exe, allows you to manage the Task Scheduler from the command line Note : JT.exe is available as part of resource kit for Windows 2000 (ftp://ftp.microsoft.com/reskit/win2000/) usage: JT {[options]|[@commandfile]} options: @ <file> - parse file /? [cmd] - display help on [cmd], e.g. /? abj !<cmd> - don't stop if command returns error /ABJ - abort task /CSAGE - convert SAGE tasks to tasks (Win9x only) /CTJ [<props>] - create trigger in task /DTJ [<id>] - delete trigger <id> (default 0) from task /EJ [<n> [T|F]] - edit task page <n>, persist changes T/f /ENC <id1> <id2> - enumerator clone <id1> from <id2> (see SCE command) /ENN <id> <n> - enumerate next <n> items (see SCE command) /ENR <id> - enumerator reset (see SCE command) /ENS <id> <n> - enumerator skip forward by <n> (see SCE command) /GC - get credential account name /GM - get target machine /ISJQ <file> - test <file> to see if it is a task /LJ <file> - load task object from <file> /PJ - print all properties of task /PRJ [<n>] - print next <n> or today's remaining run times of task /PSJ [<id>] - print trigger strings of <id> or all in task /PTJ [<id>] - print trigger props of <id> or all in task /RJ - run task /SAC <file> - scheduler activate task (load tasks\<file>) /SAJ <file> - scheduler add task (save as tasks\<file>) /SC <acct> <pwd> - set task credentials /SCE <id> - scheduler create enumerator in slot <id>=0..9 /SD <file> - scheduler delete task (delete tasks\<file>) /SE [<n>] [P] - scheduler enum tasks <n> at a time, [P]rint /SJ <props> - set task's properties /SM [<machine>] - set machine (NULL = local machine if omitted) /SNJ <file> - scheduler new task (replaces in-memory task object) /STJ [id] props - set properties of task trigger <id> or 0 /SVJ [<file>] - save task to <file> For detailed help use: JT /? <command-name>, e.g. JT /? LJ. Examples: C:\>jt /se [TRACE] Enumerating jobs and queues JSI005_State.job Windows Critical Update Notification.job C:\>jt /se p [TRACE] Enumerating jobs and queues [TRACE] Activating job 'JSI005_State.job' [TRACE] Printing all job properties ApplicationName: 'C:\Util\JSI005_State.bat' Parameters: '' WorkingDirectory: 'C:\Util' Comment: '' Creator: 'Jerry' Priority: NORMAL MaxRunTime: 3600000 (0d 1:00:00) IdleWait: 10 IdleDeadline: 60 MostRecentRun: 07/18/2000 17:30:00 NextRun: 07/19/2000 17:30:00 StartError: S_OK ExitCode: 0 Status: SCHED_S_TASK_READY ScheduledWorkItem Flags: DeleteWhenDone = 0 Suspend = 0 StartOnlyIfIdle = 0 KillOnIdleEnd = 0 RestartOnIdleResume = 0 DontStartIfOnBatteries = 0 KillIfGoingOnBatteries = 0 RunOnlyIfLoggedOn = 0 SystemRequired = 1 Hidden = 0 TaskFlags: 0 1 Trigger Trigger 0: Type: Daily DaysInterval: 1 StartDate: 04/30/2000 EndDate: 00/00/0000 StartTime: 17:30 MinutesDuration: 0 MinutesInterval: 0 Flags: HasEndDate = 0 KillAtDuration = 0 Disabled = 0 [TRACE] Activating job 'Windows Critical Update Notification.job' [TRACE] Printing all job properties ApplicationName: 'C:\WINNT\System32\wucrtupd.exe' Parameters: '' WorkingDirectory: 'C:\WINNT\System32' Comment: 'This task is created by Windows Critical Update Notification program and should not be modified or removed.' Creator: 'Jerry' Priority: NORMAL MaxRunTime: 259200000 (3d 0:00:00) IdleWait: 10 IdleDeadline: 60 MostRecentRun: 07/18/2000 12:15:59 NextRun: 07/19/2000 13:16:00 StartError: S_OK ExitCode: 0 Status: SCHED_S_TASK_READY ScheduledWorkItem Flags: DeleteWhenDone = 0 Suspend = 0 StartOnlyIfIdle = 0 KillOnIdleEnd = 0 RestartOnIdleResume = 0 DontStartIfOnBatteries = 1 KillIfGoingOnBatteries = 0 RunOnlyIfLoggedOn = 1 SystemRequired = 0 Hidden = 0 TaskFlags: 0 1 Trigger Trigger 0: Type: Daily DaysInterval: 1 StartDate: 07/19/2000 EndDate: 00/00/0000 StartTime: 13:16 MinutesDuration: 1440 MinutesInterval: 5 Flags: HasEndDate = 0 KillAtDuration = 0 Disabled = 0