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
1answer
27 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 ...
0
votes
2answers
56 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 ...
-1
votes
2answers
27 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 ...
1
vote
0answers
48 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 ...
1
vote
0answers
12 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 ...
0
votes
2answers
47 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 ...
0
votes
0answers
25 views

How to ignore/prevent schedule by "at" command if it is already schedule for the same time?

Shell script file: schedule.sh #!/bin/sh echo $(echo ./task.sh $* | at $*) The above schedule.sh file execute dynamically by user using command: $ ./schedule.sh "2:34pm 2021-05-12" My ...
0
votes
1answer
33 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
318 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 ...
1
vote
2answers
106 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&...
0
votes
2answers
97 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 `...
0
votes
1answer
50 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 ...
0
votes
0answers
41 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 ...
0
votes
0answers
35 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 ...
2
votes
1answer
95 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 ...
0
votes
1answer
188 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 "`...
0
votes
2answers
44 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>...
2
votes
0answers
68 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 ...
1
vote
2answers
55 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 ...
1
vote
2answers
148 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: " ...
0
votes
2answers
42 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.
0
votes
2answers
24 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 | ...
3
votes
2answers
180 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 | ...
0
votes
1answer
83 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
122 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?
0
votes
1answer
146 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 ...
1
vote
0answers
244 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 ...
0
votes
2answers
439 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 ...
0
votes
1answer
69 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, ...
0
votes
0answers
198 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 ...
2
votes
1answer
813 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 ...
12
votes
1answer
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 ...
0
votes
0answers
41 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 ...
0
votes
0answers
51 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 ...
0
votes
1answer
65 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 ...
3
votes
2answers
67 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 ...
1
vote
1answer
672 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.
1
vote
0answers
225 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 '...
1
vote
1answer
588 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 ...
1
vote
1answer
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.
-1
votes
2answers
105 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 ...
3
votes
1answer
582 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/...
3
votes
2answers
949 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\">...
1
vote
1answer
428 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 ...
0
votes
1answer
183 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 ...
0
votes
1answer
628 views

Running script using at command doesn't work entirely

So I did a bash script that read a file in which are directory numbers and then proceeds to run pgloader over them. I looks like this #create logs for pgloader Date=`date +%Y_%m_%d` LOGS="...
-1
votes
1answer
105 views

Why would it not be a good idea to schedule a shutdown with cron?

In an answer to the question How to shutdown Linux at a specific datetime from terminal? a high-rep user provides two solutions: using at and using cron. The cron-based option says "this not a good ...
2
votes
4answers
3k views

Temporarily declare a variable in Bash

To declare a variable in Bash, say in a Bash script-file (that doesn't include Bash function), I do for example x=y and when I finish using it inside that script-file I do unset x. Is there a way (...