4

I have an issue with at jobs being queued successfully and running successfully, but sometimes tens of minutes after they are scheduled to run.

I confirmed that atd is running:

me@hostname:~$ ps -ef | grep atd
daemon    1223     1  0 Aug27 ?        00:00:00 atd

and that the job is scheduled

me@hostname:~$ atq
260 Wed Oct 28 12:02:00 2015 a me

and the server time is later than the scheduled time

me@hostname:~$ date
Wed Oct 28 12:19:57 EDT 2015

yet the job does not run. It does run eventually, but tens of minutes later than it is supposed to.

There are no email or log error messages from atd.

If I copy the contents of at -c 260 into a script, and run it from the terminal with a blank environment, the job runs without a problem, so there doesn't seem to be any problem with the contents of the job.

This happens to some, but not all scheduled jobs. I can't identify anything different about the times when the job starts on time and the times when it is delayed.

Is this normal? Why is at running jobs so much later than their scheduled times? What can I do to make it run jobs at their scheduled times?

gWaldo
  • 11,887
  • 8
  • 41
  • 68
ff524
  • 141
  • 3
  • Are you sure, that it is not your job which runs for long? – asdmin Jul 13 '16 at 06:15
  • 1
    @asdmin Yes; the job doesn't start at all until much later. – ff524 Jul 13 '16 at 06:32
  • have you got any interesting messages in the system log? – asdmin Jul 13 '16 at 06:38
  • 1
    can you share the full command line arguments of atd? I want to exclude a `-l` flag being present there. – asdmin Jul 13 '16 at 06:39
  • can you try running atd in the foreground (`-f`) in debug mode (`-d`)? Perhaps it will reveal some additional details. – asdmin Jul 13 '16 at 06:42
  • 2
    I see at least two options in `atd` that may influence when the job are run: -l Specifies a limiting load factor, over which batch jobs should not be run, instead of the compile-time choice of 1.5. For an SMP system with n CPUs, you will probably want to set this higher than n-1. -b Specify the minimum interval in seconds between the start of two batch jobs (60 default). How is the load of the machine? – Patrick Mevzek Feb 03 '17 at 23:01

0 Answers0