After 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.
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.