Console foo: Scheduling commands

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.

At-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!

Advertisements


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