Skip to main content

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
1 vote
1 answer
30 views

How to see the content of an appointment in a queue of commands of AT command

I know i can see the schedule with atq, but this brings me only the timedate of the execution and not wich command wil be executed. [root@myserver ~]# atq 1Thu Oct 31 04:45:00 2024 a root Using at -...
A_Figueiredo's user avatar
1 vote
3 answers
107 views

How to execute mpg123 at given time with at

I was testing few things, nothing is working. I have this command called ~/bin/beep for sound notifications. #!/bin/bash mpg123 -q /home/kuba/Pobrane/beep-6.mp3 I usually use it like this: sleep 4m &...
jcubic's user avatar
  • 10.2k
0 votes
1 answer
73 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
117 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
82 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
97 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
110 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?
Caesar's user avatar
  • 11
2 votes
2 answers
121 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
59 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
215 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
2 votes
0 answers
107 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
76 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
339 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
  • 183
1 vote
2 answers
262 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
1 vote
1 answer
88 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,777
1 vote
1 answer
30 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
726 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
133 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
172 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
98 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
634 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
  • 23
0 votes
2 answers
133 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
  • 17.4k
-1 votes
2 answers
59 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
925 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.8k
0 votes
2 answers
893 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
  • 101
0 votes
1 answer
260 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
122 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
  • 398
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
521 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
213 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
163 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
83 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
  • 215
2 votes
1 answer
590 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,358
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
85 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
188 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
157 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
276 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,726
0 votes
2 answers
76 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
361 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
862 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
241 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
803 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
1k 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
  • 287
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
283 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