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
0 answers
29 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 ...
0 votes
0 answers
22 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: ...
  • 183
2 votes
2 answers
44 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 ...
  • 137
1 vote
2 answers
130 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 "...
  • 163
0 votes
0 answers
15 views

Opening web pages using crontab or at command isn't working [duplicate]

Im fairly new with Linux. Im running Ubuntu 22.04. Im trying to record a radio program that airs overnight, record it with Audacity and download the MP3 file to a thumb drive in the morning which I ...
0 votes
1 answer
47 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. ...
  • 7,021
1 vote
1 answer
18 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 ...
  • 21
0 votes
1 answer
252 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 # ...
  • 270
0 votes
1 answer
66 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 ...
  • 103
0 votes
3 answers
94 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 ...
0 votes
0 answers
63 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 ...
0 votes
1 answer
159 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 ...
  • 13
0 votes
2 answers
80 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 ...
  • 15.8k
-1 votes
2 answers
37 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 ...
  • 219
1 vote
1 answer
315 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 ...
  • 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 ...
  • 11.7k
0 votes
2 answers
294 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
1 answer
160 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 ...
  • 279
0 votes
2 answers
77 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 ...
  • 229
0 votes
1 answer
775 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 ...
  • 328
1 vote
2 answers
815 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
2 answers
288 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 `...
  • 125
0 votes
1 answer
149 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
0 answers
95 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
0 answers
51 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 ...
  • 185
2 votes
1 answer
272 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 ...
  • 2,238
0 votes
1 answer
671 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
2 answers
72 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>...
  • 1
3 votes
0 answers
122 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 ...
  • 31
1 vote
2 answers
97 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
2 answers
657 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
2 answers
115 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.
  • 1,574
0 votes
2 answers
49 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
2 answers
264 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
1 answer
311 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 ...
1 vote
1 answer
169 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 ...
  • 11
0 votes
1 answer
441 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?
  • 11
0 votes
1 answer
483 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 ...
  • 257
1 vote
0 answers
867 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
2 answers
1k 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 ...
  • 1
0 votes
1 answer
220 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
0 answers
397 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 ...
  • 101
2 votes
1 answer
2k 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 ...
  • 8,788
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 ...
0 votes
0 answers
47 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
0 answers
97 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
1 answer
149 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
2 answers
74 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
2 votes
1 answer
1k 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
0 answers
296 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,574