Console foo: Scheduling commands

Post by Nico Brailovsky @ 2009-09-15 | Permalink | Leave a comment

You can easily schedule a command using "at", which recognizes a nicely formatted date string.

For example:

$ at today 3:00 AM

This will open a prompt. So, for example:

$ at today 3:30 PM
> wget foobar.com/a_huge_file
> C-D

Will schedule a download of a huge file, today at 3:00 AM. Nice, isn't it? To check the whole list of accepted formats check the man for at.

One last note: at will "remember" the current environment variables, so PWD, USER, OLD_DIR and all that will be the same. This means if you schedule a command with a relative path it'll still work!