New answers tagged

1

In some cases, the 'at' command is missing entirely and the package needs to be installed. Look for the at.x86_64 or at_i386, at_i486, at_i586 packages. Both OEL71 and CentOS can add it with: yum -y install e.g.: yum -y install at.x86_64 If you try copying the commands from another host, you will get pam authentication errors when run by anything ...


3

The RedHat (and thus Centos and friends) at and also Debian-derived vintages (as rpm -qi at on RedHat indicates a Debian URL, and also derobert in comments, above) should support a -M option: -M Never send mail to the user. Lacking this, another option would be to suppress output from the job: #!/bin/bash exec >/dev/null 2>&1 ... the ...


1

Do at now << EOF commands ︙ EOF You'll be able to do readline-like editing while you're typing the commands.


5

You could use a program such as rlwrap (readline wrapper) for this: rlwrap at now Further reading: hanslub42/rlwrap (github) * HOW TO USE IT: If $ <command> <args> doesn't let you use arrow keys to edit input, or if you just want decent input history and completion, try: $ rlwrap [-options] <command> <args>


1

Aha, I feel silly now: [vagrant@localhost ~]$ sudo service atd restart Stopping atd: [FAILED] Starting atd: [ OK ] [vagrant@localhost ~]$


1

I think you mean echo sendit mail1.txt|at 02:37 May 03.


4

The | sends the stdout of the left process to the right command. Your sendit function actually sends the mail, but doesn't produce much output on stdout (I actually don't remember what the output of mail is), so the input to at isn't a command to send the mail. Consider that as a user, you would typically have used at like this: at 02:37 May 03 # ...


1

It appears at now is setting the time as far in the future as possible when parsing of the time string now fails. The command batch is intended to run now, or at least as close to now as load permits. You may be able to reschedule by using atq to cat the job to an at request with the desired time. The man page for at, batch and related commands should ...


1

With regards to now the man at states that: You can also give times like now + count time-units, where the time-units can be minutes, hours, days, or weeks Nowhere does it say it is allowed to use at now without such an additional count of time-units, so I am not surprised you get undefined/unexpected behaviour.



Top 50 recent answers are included