at command is not executed

Take a look at /var/at/jobs and see if your at jobs are listed there. (It may be a different directory based upon OS).

By default, at isn't enabled on most systems. In order for at jobs to actually get executed, the atrun command must execute.

This command is executed either through launchd or through the cron depending upon the system.

The exact mechanisms are different from system to system, so you'll have to read all the various manpages on at, atrun, etc. to verify if at is really enabled on your system, and whether you have permissions to run at jobs. There's normally both an ant allow and an ant deny file on your system, so you need to check both. You must be both in the allowed file, and also not in the deny file.

On top of that, you have to make sure that at is even enabled on your system (due to security concerns, it is usually disabled).


It is working fine. It's just that commands running with at don't write their output to the terminal that you called it from.

Try:

at now +2 minutes
echo TTTEEEST > new_file_test

You'll see the file appear in two minutes.


Check your mail:

   An at - or batch - command invoked from a su(1) shell will
   retain the current userid.  The user will be mailed standard
   error and standard output from his commands, if any.  Mail
   will be sent using the command /usr/sbin/sendmail.  If at is
   executed from a su(1) shell, the owner of the login shell
   will receive the mail.

Tags:

Unix

Bash