2
1
*nix has the "at" command, which can be piped to to run a program at a certain time. Like this:
echo "SOME_COMMAND" | at 00:00
Windows also has an "at" command, which creates a run-once scheduled task that runs in the background by the user SYSTEM. "schedtasks" is more complete, but also a pain to use (especially since it requires a unique name for each task, the idea of creating a batch to create a run-once task *nix style in order to mimic *nix's "at" becomes kinda unpractical).
So, is there a utility for Windows that does what *nix's "at" does, in a simple, non-hassle way?
UPDATE: I'll be more a little more specific now =). I'm trying to power off my monitor at a certain time, and I use a command-line utility called nircmd so I can simply type "nircmd monitor off" to do the job. If I used Linux on this computer, all I had to do was
echo "nircmd monitor off" | at XX:YY
or create a "macro". But in Windows I only have the scheduled tasks, which is a rather bureaucratic way of creating a run-once task, since "at" doesn't really work (see my similar question Windows Task Scheduler and possible permission problems) and "schedtasks" requires the whole unique name thing mentioned above.
Being a programmer, it should be easy enough to create such a program that mimics Unix's "at". But I wanted to make sure that I wasn't reinventing the wheel first.
Not really. If you want simplicity, you're stuck with
at
. If you want complexity, you're stuck withschedtasks
. It's unfortunate, but that's the case. There may be a third party tool out there to make it easier, or you could just write a batch script to do it. – nhinkle – 2010-07-14T07:16:24.907I guess I should have made it clearer before: I have no hopes of finding such a tool in Windows itself, so what I'm really looking for is a third-party tool. – Rafael Almeida – 2010-07-14T13:46:39.730
I that after reading your update you will probably come to the same conclusion that I have done and just write your own simple scheduler, it is fairly simple to write a program in your preferred language which runs in the background and intermittently checks whether it's X o'clock yet and if so to run task Y. – Richard Lucas – 2010-07-15T05:29:49.850