Running a command in now + X minutes rounds down to closest minute and does not account for seconds

Bug #2036991 reported by Ludo-code
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
at (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Hello,

Please suppose that is 17h23 and 56 seconds...

I have remarques that when you make for exemple :

at now +10 minutes

The commands that you have made will be executed at 17h33 and not care about seconds however the good output should be 17h33 and 56 seconds...

I suppose that the issue is common on all Linux where "at" is installed

Tags: server-todo
Ludo-code (ludo-code)
description: updated
description: updated
Revision history for this message
Mitchell Dzurick (mitchdz) wrote (last edit ):

Hi Ludo, thanks for making the bug report!

When you say good output, do you have a reference showing that the seconds should be accounted for? It seems to be working as at(1) describes.

With that said, I noticed that the -t flag allows second granularity, but you have to provide the absolute time. I made this short bash line for you to try out and see if it works good for your use-case:

# schedule_time=$(date -d "+ 10 minutes" +\%m\%d\%H\%M.\%S) && at -t $schedule_time
warning: commands will be executed using /bin/sh
at Fri Sep 22 16:40:32 2023
at>

Changed in at (Ubuntu):
status: New → Incomplete
Revision history for this message
Ludo-code (ludo-code) wrote :

So if you type an at commands at show an output to say at which time he would be executed but when he make the output for

 at now +10 minutes

And it's 13h37 and 29 seconds.

The output say that the command will be executed at 13h47:00...

So yes your line works but why doesn't work directly with the now options?

tags: added: server-todo
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thanks Ludo!

I believe this behavior is intended by the authors of the package. I'd encourage you to ask the question upstream as I do not believe this is a bug in Ubuntu.

you can find the contact information in the README at https://salsa.debian.org/debian/at

Lena Voytek (lvoytek)
Changed in at (Ubuntu):
status: Incomplete → Won't Fix
summary: - Seconds are not supported...
+ Running a command in now + X minutes rounds down to closest minute and
+ does not account for seconds
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.