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
39 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 # ...
user avatar
  • 260
0 votes
1 answer
21 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 ...
user avatar
  • 103
0 votes
3 answers
72 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 ...
user avatar
0 votes
0 answers
26 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 ...
user avatar
0 votes
1 answer
35 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 ...
user avatar
  • 13
0 votes
2 answers
65 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 ...
user avatar
  • 14.3k
-1 votes
2 answers
31 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 ...
user avatar
  • 109
1 vote
0 answers
89 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 ...
user avatar
  • 11
1 vote
0 answers
13 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 ...
user avatar
  • 10.6k
0 votes
2 answers
80 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 ...
user avatar
0 votes
1 answer
61 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 ...
user avatar
  • 279
0 votes
1 answer
33 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 ...
user avatar
  • 205
0 votes
1 answer
501 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 ...
user avatar
  • 298
1 vote
2 answers
236 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&...
user avatar
0 votes
2 answers
156 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 "root@135.102.22.0" -o StrictHostKeyChecking=no `...
user avatar
  • 105
0 votes
1 answer
83 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 ...
user avatar
0 votes
0 answers
46 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 ...
user avatar
0 votes
0 answers
36 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 ...
user avatar
  • 173
2 votes
1 answer
142 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 ...
user avatar
  • 2,198
0 votes
1 answer
308 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 "`...
user avatar
0 votes
2 answers
48 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>...
user avatar
  • 1
2 votes
0 answers
83 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 ...
user avatar
  • 21
1 vote
2 answers
58 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 ...
user avatar
1 vote
2 answers
266 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: " ...
user avatar
0 votes
2 answers
46 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.
user avatar
  • 1,524
0 votes
2 answers
28 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 | ...
user avatar
3 votes
2 answers
191 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 | ...
user avatar
0 votes
1 answer
124 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 ...
user avatar
  • 550
0 votes
1 answer
120 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 ...
user avatar
  • 1
0 votes
1 answer
187 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?
user avatar
  • 1
0 votes
1 answer
223 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 ...
user avatar
  • 247
1 vote
0 answers
429 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 ...
user avatar
0 votes
2 answers
612 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 ...
user avatar
  • 1
0 votes
1 answer
96 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, ...
user avatar
0 votes
0 answers
249 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 ...
user avatar
  • 101
2 votes
1 answer
1k 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 ...
user avatar
  • 8,378
12 votes
1 answer
2k views

How does `at` know there will be a time change?

I happened to be twiddling around with at just yesterday at 2:40 AM. (Don't ask...) I tried scheduling events one minute in the future (as a test), and – it just didn't happen. The events were in the ...
user avatar
0 votes
0 answers
46 views

How to correctly use Linux "at" command to execute a shell script that runs a matlab script?

I have the following shell script: #!/bin/bash matlab -nodisplay -nosplash -nodesktop -r "run('/home/username/test.m');exit;" The test.m script is a matlab script that plots a graph and saves the ...
user avatar
0 votes
0 answers
55 views

At -q not queuing

I am using Ubuntu server. I have the following at command: at -q a now I expected that the -q a would cause the commands to run sequentially, but they are not. On inspection with atq they are all ...
user avatar
0 votes
1 answer
81 views

Need an "at" Command Timestamp That Runs Command Monthly at Given Day

Need an at command timestamp that run some command at given day monthly, like for example, every day 15, as would follow: $ at every 15 day So that on every day 15, it would run some command. How ...
user avatar
3 votes
2 answers
70 views

How can I schedule an command with `at` which requires `Eth0` interface to up and running?

Need here to schedule some email sending at some date with at command, but need first to ensure that Eth0 interface is up and running. How could I do that? Currently using Mutt Mail User Agent ...
user avatar
1 vote
1 answer
892 views

Editing a job in At command

Trying here to modify a job from at command. Any idea on how to do it? Already managed to list it, delete, and execute, but can't modify it.
user avatar
1 vote
0 answers
248 views

OSX: at requires GUI confirmation

I did as per the instructions in Making "at" work on macOS (see also SuperUser) launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist to enable at on macos and now echo '...
user avatar
  • 1,524
1 vote
1 answer
762 views

Why does Debian run "atd" as the "daemon" user?

$ ps -aux|grep atd daemon 800 0.0 0.1 27964 2228 ? Ss 19:11 0:00 /usr/sbin/atd -f alan-sy+ 7042 0.0 0.0 12780 948 pts/0 S+ 20:22 0:00 grep atd $ /sbin/getpcaps 800 ...
user avatar
  • 44.3k
1 vote
1 answer
68 views

Is it possible to get the history of commands run with "at"? [duplicate]

I think the title says it. I would like to retrieve the history of commands run a few days ago with at to double check some error we got on an import process.
user avatar
-1 votes
2 answers
116 views

at not executing scheduled command - troubleshooting

I am writing this bash script, that will read a file containing a date, a time and a phone number, and it will use an SMS provider API to send an sms reminder. #!/bin/bash while read date time phone ...
user avatar
3 votes
1 answer
733 views

What timezone does the `at` command use?

I've searched in the man pages for the at command there are no mentions of timezone or tz. There is this: The exact definition of the time specification can be found in  /usr/share/doc/at-3.1.10/...
user avatar
  • 133
3 votes
2 answers
1k views

specify a time interval in which to execute a certain script

I have this bash script: while [[ 1 ]] ; do sleep 3600 ; ./notify.sh --text "ricordati di bere" && play /mnt/musica/login.wav && zenity --info --text="<span size=\"xx-large\">...
user avatar
  • 81
1 vote
1 answer
499 views

How do I get the prompt back when running `at' from terminal

Perhaps this is more of a general question on scripting and terminal use than of the use of the `at' command. Regardless, I am exploring the use of the at command to get a handle on its behavior and ...
user avatar
  • 11
0 votes
1 answer
210 views

Linux "At" Job Executes Immediately

I have a PHP web application that schedules Linux "at" jobs using the PHP function exec(). The scheduled task is another PHP script. Somehow, under certain conditions that I suspect are related to ...
user avatar