CLI.png

%SystemRoot%System32 Secrets: Schtasks

CLIAfter my previous post about AT command I received some feed back from people who obviously enough hadn’t read my post in its entirety =) The feedback stated that “AT is deprecated and is to be replaced with schtasks”. You bet I knew that! =)

Nevertheless, schtasks is really more powerful and since my article touched more than one heart I decided to write next message not about auditpol, which is next in my alphabetical list of interesting apps in System32 folder, but about schtasks. Let’s begin.

Schtasks

Comparing to AT it is a huge advancement. Really, here are its subcommands: create, change, run, end, delete, query. Actually it can do everything you can do through Scheduled Tasks applet in Control Panel. And since it is a CLI command, everything is scriptable. But as usual, there is a payback for the power: the syntax description consists of 33 pages in MS Word with the font size 8.5. 33 pages! Still, they recommend to switch from AT to this command and, to be honest, you don’t have much choice if you need just a bit more than AT can give you. Moreover, if you want to learn the syntax, it can be rewarding:

schtasks /create /tn “Shutdown Friends Machine” /tr “shutdown /s /f /t 0” /sc minute /mo 5 /s friend

The command above replaces ALL the commands I was to enter using AT.

About these ads

3 thoughts on “%SystemRoot%System32 Secrets: Schtasks

  1. Pingback: Migrate scheduled tasks from 2003 to 2008 | IT, IS, etc...

  2. Pingback: Migrate scheduled tasks from 2003 to 2008 » IT, IS, etc…

  3. Pingback: Migrate scheduled tasks from 2003 to 2008 - IT, IS, etc...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s