Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [at]

A utility used for scheduling an event to happen once at some point in the future.

Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

start command at given time interactively in terminal

is there similar command to sleep, but where I can specify given time, so that my command will start at given time, INTERACTIVELY in my current open terminal window? I know about at command, but that ...
Martin Vegter's user avatar
0 votes
3 answers
44 views

"at" command does not run desired program / script

I am trying to learn scheduling with the "at" command, and therefore, I want to test it out and keep things simple. For example, when I type "at 00:28" (my time zone's format), and ...
popsmoke's user avatar
0 votes
1 answer
46 views

Can't shutdown Linux guest OS with `at` command

Here are three examples of what I did inside the terminal (the third one has sudo): at now + 5 minutes (interactively:) at> shutdown --poweroff now echo "sbin/shutdown -h now" | at 14:...
Samir Fink's user avatar
0 votes
1 answer
58 views

How to run a one-off command at a specified future time in Guix?

I want to run a shell command once at a specific time in the future on Guix. My idea was to use the at command, but that seems to not be available on Guix. The imperative nature of my desire goes ...
BlackShift's user avatar
0 votes
3 answers
106 views

How does at behave when going off the end of a month with a relative date?

When using at midnight next month and it is the 31 of January, how will it behave? Will it be the 4th of March or 28 of February? or the 31 of March?
Xavanteex's user avatar
2 votes
2 answers
87 views

at jobs: queue IDs and job files

root@calleva:/var/spool/cron/atjobs# echo "sleep 3000" | at 20:58 warning: commands will be executed using /bin/sh job 161 at Sat Jun 3 20:58:00 2023 root@calleva:/var/spool/cron/atjobs# ...
Richard Barraclough's user avatar
0 votes
0 answers
56 views

How can Linux "at" be used to open a gnome-terminal window?

Using "at" to execute a shell command that writes to a file works. Using it to open a gnome-terminal does not work. OS: Ubuntu 20.04 A file containing a command to write the date to a file ...
bac-cab's user avatar
0 votes
1 answer
127 views

How does atd store its job schedule?

On CentOS, scheduled at jobs are clearly stored in /var/spool/at, one file per job. However, what's not clear is where the start times for the jobs are stored. Job file names are a 14 character hex ...
Swechsler's user avatar
  • 147
1 vote
0 answers
63 views

Listing 'at' jobs with custom time format

Hello I need to list 'at' jobs with the following format "year-month-day hours:minutes:seconds". From the 'at' man page the synopsis I need is the following: at [-V] -l [-o timeformat] [job ...
Centuri0n's user avatar
0 votes
0 answers
62 views

Why does the at command not control my wifi via nmcli?

I have at installed on Manjaro. This works fine: echo "echo 'hi' > /tmp/greetings" | at now + 1 minutes -M But if I try to switch off my wifi after one minute it doesn't do anything: ...
aBe's user avatar
  • 183
2 votes
2 answers
164 views

show command details with at

I am very new to using at and am wondering how to display the command by a scheduled job. postgres@dcjsn-jv2526:/opt/db/backup/postgres/dumps> atq 29 Wed Nov 2 18:55:00 2022 a postgres I see ...
vrms's user avatar
  • 139
1 vote
2 answers
227 views

Delete jobs from at queue on startup

I'm on Ubuntu 18.04.6 LTS and I have a cronjob that schedules automatic shutdown commands to a specific at queue every minute: $ crontab -e */1 * * * * [ -z "$(w -h)" ] && echo "...
23tux's user avatar
  • 175
0 votes
1 answer
77 views

Is there a user-level utility which offers the features of "cron" or "at" and only within a particular session?

I want to run a some scheduled commands on a timed basis within a manually startedscreen session and only within that screen session, because it uses an ssh authentication tied to that session. ...
vfclists's user avatar
  • 7,551
1 vote
1 answer
24 views

Running `at` commands with macOS Shortcuts

I have a shortcut that I want to run in x minutes. I can run the shortcut from the command line as follows: shortcuts run "turn lights off" When I try to schedule it using at however, like ...
Aru's user avatar
  • 21
0 votes
1 answer
625 views

atd Job Didn't Run at Scheduled Time

I scheduled a one-time job with atd on an OracleLinux 7 server. However, it's still in the queue after the system clock has passed the scheduled time. # atq 2 Mon Mar 14 00:00:00 2022 a root # ...
NeilWang's user avatar
  • 270
0 votes
1 answer
110 views

`atq` lists a job even if it was executed yesterday

I created an at job that executes a script with the -f flag. The script restarts tomcat. The job was scheduled to be executed at Feb 21 18:00:00 2022 which was yesterday. I just confirmed tomcat was ...
Alex's user avatar
  • 103
0 votes
3 answers
145 views

What is the easiest way to run a program from time X to time Y?

There is a certain potentially failing process that I want to run until it succeeds, during the night time, say, from 23:00 to 7:00, but not later. A possible solution would be to: Add a cron job for ...
Vladimir Nikishkin's user avatar
0 votes
0 answers
84 views

What is the most efficient way to run a task every X hours of runtime, accumulated over all power-ons?

Let us assume that I have a machine which wakes up at 7:00, does some work, usually for 15 minutes, but sometimes for days (e.g., experiment supervision), and after the works is done, it powers ...
Vladimir Nikishkin's user avatar
0 votes
1 answer
488 views

Running at command ran the script immediately

I tried to use "at" command to stop and start the server at the certain time, but for some reason the script ran immediately. I tried different ways to do that, but it would always run. What ...
Marko's user avatar
  • 13
0 votes
2 answers
115 views

Why doesn't the following call to 'at' execute the bash script?

I made a bash script called test.sh that contains the following: #!/#bin/bash echo "Done!" I enter bash test.sh | at 1549: myusername@machine:path$ bash test.sh | at 1549 warning: commands ...
Andrew's user avatar
  • 17k
-1 votes
2 answers
57 views

'at' job fails: Script not found in the directory (raspberry pi)

I am trying to run an 'at' job. The job is in ~/mydir/first.sh. It executes second.sh using (sh second.sh) which is in the same directory. I get an error saying that the file is not found. This is ...
SEU's user avatar
  • 219
3 votes
1 answer
699 views

using systemd-run to replace 'at' commands

What is the best way of using systemd-run in place of a simple sudo -u xxx at -f backupJ-447.cmd 03:10 Our org has gone systemd mad and no longer installs 'at', 'batch' and cron is depricated on our ...
ferg's user avatar
  • 141
1 vote
0 answers
15 views

What happens to at-scheduled job when PC is off? [duplicate]

Say I have job scheduled via at - what happens when the PC is off during that scheduled time? Will the job be caught up for during reboot? Does this have to be specified? Or comparing this to cron: Is ...
FelixJN's user avatar
  • 13.6k
0 votes
2 answers
778 views

How to check runtime log for a batch job submitted using `at` command?

I submit the batch job in Ubuntu 20. at now -f myscript.sh I get an email with a log when the job is completed. But for a time-spending job, I would like to see progress during the execution. How can ...
Pritalgo's user avatar
0 votes
1 answer
240 views

Pipe output of "at" delayed command to a file

I want to append to a file in a few minutes' time. I naively thought I could do: echo "hello world" >> /tmp/foo.txt | at NOW + 1 MINUTE But that appends to the file immediately. I ...
LondonRob's user avatar
  • 291
0 votes
2 answers
98 views

How to make `at` command to understand the bash alias or function?

I am having a function written inside bashrc like - function build_image () { ... } This function will trigger compilation of the source code. Now I need to trigger this image building/compilation ...
Darshan L's user avatar
  • 279
0 votes
1 answer
1k views

How to run bash script with at command on freebsd

I have a bash script that it should start at a specific time. I used from at command. When I run it with at, the job create and after the time the job start but it doesn't do it's work. When I run the ...
F.M's user avatar
  • 388
1 vote
2 answers
1k views

Bash script is not working when using case statement to make decision

I have the following script that will schedule a job based on input from the file "schedule.csv". The file contains 7 fields and the $f7 field contains a flag that either has "NOT_S&...
Eddie Reed's user avatar
1 vote
2 answers
447 views

sshpass Solaris one liner passing a command

I am trying to pass one liner sshpass command to Solaris box but won't work. those are the options I tried: sshpass -p "passw" ssh "[email protected]" -o StrictHostKeyChecking=no `...
dwt.bar's user avatar
  • 145
0 votes
1 answer
205 views

Why does $ echo "Testing" | write user pts/0 | at now + 1 min execute instantly?

I want to integrate the at command into a script, but that script is reliant upon the write command executing at the right time. So far, every time I try to do this, it just writes instantly, not at ...
Vellutante's user avatar
0 votes
0 answers
140 views

At command doesn't run scripts with f key

I tried to schedule a task with at command using the following: at now + 1 minute -f alarm.sh It didin’t run a chosen script. Then I tried: echo "./alarm.sh" | at now + 1 minute It didn’t ...
Andrew Lukjanov's user avatar
0 votes
0 answers
74 views

How to schedule an at job to take place in the past?

I have an interesting situation where it would be useful to schedule an at job in the past, to be triggered after a reboot on a system that doesn't maintain a real-time clock during power-down. If I ...
bitsmack's user avatar
  • 205
2 votes
1 answer
507 views

Setting verbose option for at(1) and batch(1) commands

I'm trying to set automatically the verbose and xtrace options for shells which are reading their commands from a standard input which is not connected to a terminal (that test is a proxy for being ...
AProgrammer's user avatar
  • 2,338
0 votes
1 answer
1k views

“at” command does not execute shell script

I want to run a script at a specific time. I found that at command is the solution but the shell script i attached with it is not being executed. I used below multiple commands but no use. echo "`...
Ubaid Ilyas's user avatar
0 votes
2 answers
80 views

Command-line completion while using the 'at' command

When entering commands into the at> prompt, I am unable to activate command-line autocompletion using the Tab key. $ at now + 4 hour at> Is there a way to turn on tab completion in the at>...
kevin's user avatar
  • 1
3 votes
0 answers
174 views

Cannot turn on atrun to use "at" commands

In Mac OS 10.15.5, I can run the command: echo "mkdir foldername" | at now + 1 minute and it "runs" (i.e. it doesn't give me any error), and when I run atq, it lists it in the ...
mancat's user avatar
  • 31
1 vote
2 answers
145 views

Why does `at` not execute GUI applications?

On my Ubuntu 20 desktop, I've scheduled gedit to run a minute from now, but nothing happens. Why is that? $ echo "echo foo > at.sux" | at now + 1 warning: commands will be executed using /bin/sh ...
Dan Dascalescu's user avatar
1 vote
2 answers
1k views

Within a shell script, how can I schedule a function to run at a specified time?

In a bash script, I have some code that needs to run when the script is executed, then a function that I want executed at a specific time. How can I do that? # Do this now read -s -p "Password: " ...
Dan Dascalescu's user avatar
0 votes
2 answers
243 views

How to find out what a specific at job will do?

Is there a way to find out what an at job will do? atq only gives the time and owner.
sds's user avatar
  • 1,696
0 votes
2 answers
73 views

at & rm - command executed before pipe

System: Redhat 7.8 Goal: I have a bash script which downloads a files to a folder named "logs" for viewing for a short time and removes them at the end of the day. What I've tried: rm -rfd logs | ...
alcazaro's user avatar
3 votes
2 answers
352 views

Pass the "at" command a string command instead of a path to a script whilst having it run immediately

Using the at command I can run a script once in the future: at now + 1 minutes -f ~/script.sh or run a string command now then return the result in the future: echo "xyz" >> ~/testtest.txt | ...
Carl Sega's user avatar
0 votes
1 answer
723 views

how to schedule a task that runs a command or script when a user logs on?

I want to program a script that is launched whenever a specific user, let's call it user log in. For example, when you log on to the computer with that user or using the su command on a terminal. I ...
Fco Javier Balón's user avatar
1 vote
1 answer
218 views

Custom id for "at" jobs

I've been using at to schedule emails to be sent at a specific date and time. Problem is that the command that I wish at to execute should take the job id as a parameter hence why I should be the one ...
Joe's user avatar
  • 11
0 votes
1 answer
682 views

Is there a limit to the number of jobs that I can queue using "at"?

I'm using at to schedule email reminders. The number of jobs that I could queue could be several thousands at a time. Is this possible or do I have to find another solution?
Joe's user avatar
  • 11
0 votes
1 answer
943 views

Schedule a script with arguments using 'at'

I have a bash script and I want to run it at a given time. Usually I would write something like this to run it immediately: ./my_script.sh 1 1 n 8 3 keywords here I am trying to execute the same ...
Robb1's user avatar
  • 277
1 vote
0 answers
2k views

Remove connman without disrupting ethernet connection

For a bunch of historical and justifiable reasons, I have a situation where I need to programmatically configure a device with a fresh Debian installation, over a ssh connection. Think of it like a ...
Heath Raftery's user avatar
0 votes
2 answers
2k views

How to pass command line arguments to bash script when executing with at?

I have a bash script needs run at a specific time and found out at is pretty much does what I need to do. But the problem is I'm not sure how can I pass command line arguments to the bash script ...
yash's user avatar
  • 1
0 votes
1 answer
275 views

Can i access the environment variables set when a script is added to linux "at" command queue?

I wanted to know if I can access the custom env variables that are set while adding a script to the "at" command queue before it runs ? I understand that certain system env variables like: TERM, ...
Rakshith Chengappa's user avatar
1 vote
0 answers
560 views

How to force execution of "at" job

I'm using the at command to schedule a "update process" who cannot be launched from my service to prevent the association of the service process with my update process, because my update process will ...
Beto Neto's user avatar
  • 111
3 votes
1 answer
3k views

Schedule command to run at specific timestamp with systemd

I would like to schedule a command to be run at a specific time, identified by a Unix timestamp. It seems like this might be doable with systemd, using systemd-run, but how would that work? And what ...
a3nm's user avatar
  • 9,217