At jobs disappearing due to job number issue

I use the at command semi-regularly to send myself reminders of things to do on particular days.

Suddenly the numbering seems to have gone haywire and jobs are getting overwritten.

Newly assigned job numbers started over again from one and increment from there so when they hit an existing job number that job get overwritten.

Has anyone else encountered this?

I see that the at command was updated (on my computer) on December 1.

Name : at

Version : 3.1.23

Release : 13.el9_7

Architecture: x86_64

Install Date: Mon 01 Dec 2025 10:49:39 PM

This leads me to suspect that something during that updated caused at to lose its last-used job number, and then it started counting over again from job number 1 (and overwriting existing jobs).

This seems strange since the job numbers aren’t actually stored in a variable but are simply the filenames used in the at spool directory.

I have deleted all of my at jobs and re-entered them so we’ll see what happens now.

Incidentally, for anyone who’s interested in a way to use at as a simple reminder program, what I do is this:

  1. Enter the at command with the time I want the reminder: “at 4am dec 2”
  2. Enter the reminder I want, starting with the command echo: “echo remember to do something”
  3. Hit ctrl-d to exist from at.

That’s it. At, in this example, 4am on December 2 I’ll get an email that tells me “remember to do something”.

Wouldn’t it be simpler to do a cron instead, eg:

0 4 2 12 *     username     "echo remember to do something"

whilst I realise at should work, it can be accomplised with cron as well. The above cron would run at least at the date/time you wanted.

I use cron for recurring reminders (remember to do X every second Tuesday, or do something else on November 17 of every year) and use at for one-shot reminders like take the truck for an oil change next Wednesday.

I’ve been doing it that way for years and to this point at has always worked as expected. I’m going to be keeping a close eye on the at job numbers for the next while, though. It really does seem like there is or was some kind of a bug in the last at update that caused the job numbering scheme to reset itself back to 1, and I find that very strange and surprising.

You can get pretty fancy with cron and repetitive reminders, though:

0 4 * * 2 [ $(date +\%d) -le 7 ] && mail -s "Today is the first Tuesday of the month" myusername@localhost >/dev/null 2>&1