From the course: Linux CentOS 7: Shells and Processes
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
One-time jobs using at and batch - Linux Tutorial
From the course: Linux CentOS 7: Shells and Processes
One-time jobs using at and batch
- [Instructor] There are two different types of scheduled jobs. One time jobs and recurring jobs. For one time jobs we use a service called at. The at service runs at jobs at a certain time. Or in the case of a batch job, when the CPU load average drops below 0.8. The syntax for at is at, space, and then the time format. At supports a wide variety of time formats including simple 12 and 24 hour clock times, like 4:25 am, or 16:45. It also supports general terms like midnight, noon, tomorrow, and now, plus a specified number of minutes, hours or days. It even supports teatime which is apparently at 4 pm. If we don't want to schedule one time job today, we can specify a time and date. The time format always has to come before the date. The at services is usually installed by default. Let's be sure by installing it using Yum, and if there's a newer version Yum will update it. Type into a terminal sudo Space, yum Space, install Space -y, Space at, and hit Enter. Type in your password and…