Home » Questions » Computers [ Ask a new question ]

Question about at

Question about at

I tried to use at to schedule a job running at a specific time. I have a Mac computer. For example, I tried to test this by for the following at in Terminal:

Asked by: Guest | Views: 101
Total answers/comments: 1
Guest [Entry]

"It is indeed the default behavior of at as stated in man at:

The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If at is executed from a su(1) shell, the owner of the login shell will receive the mail.

For a different behavior you can invoke at like this:

$ at now + 1 minute
$ echo ""test at"" > /dev/ttys000
$ <EOD>

Which will redirect STDOUT to the terminal ttys000.
You need to replace /dev/ttys000 with the corresponding device file of your terminal, which you can determine by running the following command:

$ tty

Scheduled jobs are executed in their own shell (see man at for more details), such that bg won't list them. To see a list of scheduled jobs, you might want to try atq or at -l"