Using ‘at’ to schedule a job in Unix

Unix command ‘at’ can be used to schedule a task at specific time.To get into ‘at>’ command prompt use command ‘batch’.

[leenus@oracle ~]$ batch

at> at 5pm today

at> nohup tar -xzvf oracle.tgz > ~/nohup.out

at> mail -s “Scheduled task Completed” me@myhost.com << ~/nohup.out

ctrl+d to save the job.

To see the scheduled jobs we can give atq

To remove the scheduled job execute atrm -<job_number>

Advertisement

About leenus2b

Lohman Castings, Pioneers in Cast Iron, Steel, Nickel-Chromium and many other types of Castings manufacturers. An ISO:9001-2000 Certified Company
This entry was posted in Linux. Bookmark the permalink.

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 )

Connecting to %s