Using at Command To Scheduler A Process

Usually, on Unix/Linux, we use the crontab to planify tasks or process but it is not the unique way, of course, maybe crontab is the best.

In this blog entry I like talk about at command, it is so easy to use. At command is very usefull when you haven’t permission or doesn’t exits the crontab file.

With the next command you check if any process or tasks have been planified by at;

at -l

For create a new schedule you can use the next command;

at -k -f /usr/tmp/ now + 2 hours

Last command will execute the /usr/tmp/ file in two hours from now, the file will be execute with Korn shell because of -k flag.
If you execute the at -l you will see something similiar to next output;

$ at -l
1485896164.a Tue Jan 31 20:56:04 2017

A problem of at command is that it not show the task/process/file to execute. For delete a at entry you need the identificator, the first column. It is shown below;

$ at -r 1485896164.a



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s