5 Changing the Behavior of Batch Jobs

Change the load-average limit and minimum interval time for batch jobs.

The system load average represents the average number of processes that are queued to run on the CPUs or CPU cores over time. Typically, a system isn't considered overloaded until the load average exceeds 0.8 times the number of CPUs or CPU cores. On such systems, you can use atd to run batch jobs when the load average drops to less than the number of CPUs or CPU cores, rather than the default limit of 0.8. For example, on a system with 4 CPU cores, you could set the load-average limit over which atd can't run batch jobs to 3.2.

If the batch job often takes more than a minute to run, you can also change the minimum interval that atd waits between starting batch jobs. The default minimum interval is 60 seconds.

For more information about monitoring CPU usage and to display the system load average, see Oracle Linux 8: Monitoring and Tuning the System.

  1. Open the /etc/sysconfig/atd configuration file with a text editor.
  2. Uncomment the line that defines the OPTS variable.
  3. Provide new values for the load average limit and the minimum interval time to the OPTS variable. For example, to set the minimum interval to 100 seconds and the load-average limit to 3, set the following configuration option:
    OPTS="-b 100 -l 3"
  4. After saving /etc/sysconfig/atd configuration file, restart the atd service:
    sudo systemctl restart atd
  5. To verify that the atd daemon is running with the new minimum interval and load-average limit, run the following command:
    sudo systemctl status atd
    atd.service - Job spooling tools
      Loaded: loaded (/usr/lib/systemd/system/atd.service; enabled)
      Active: active (running) since Fri 2025-06-13 15:37:04 BST; 2min 53s ago
    Main PID: 6731 (atd)
      CGroup: /system.slice/atd.service
              └─6731 /usr/sbin/atd -f -b 100 -l 3
    
    Jun 13 15:37:04 localhost.localdomain systemd[1]: Started Job spooling tools.

After these steps have been followed the minimum interval and the load-average limit are changed from the defaults. For more information, see the systemctl(1) and atd(8) manual pages.