You are not logged in.
Hi,
I seem to have an issue with running the "at" command. I've been through the previous thread about at: https://bbs.archlinux.org/viewtopic.php?id=129216, however this doesn't help me solve my issue.
My daemon for atd is running; (from ps -elf | grep atd) -> "5 S daemon 1002 1 0 80 0 - 4207 - 09:50 ? 00:00:00 atd"
I'm just trying to get a testing script to work for now, what I do is:
$ at 11:00 < /full/path/to/justfortestingpurposes.sh
>warning: commands will be executed using /bin/sh
>job 16 at Mon Aug 7 11:00:00 2017
the script should simply make a file, and post a line: "echo 'This is a test' > foo.txt"
and before the given time, the script seem to be found just fine;
$ atq
>16 Mon Aug 7 11:00:00 2017 a kim
but when the time come around, nothing happens. I'm not even shure which log files to look into for directions.
Offline
−m Send mail to the invoking user after the at-job has run, announcing its completion. Standard output and standard error produced by the at-job shall be
mailed to the user as well, unless redirected elsewhere. Mail shall be sent even if the job produces no output.If −m is not used, the job's standard output and standard error shall be provided to the user by means of mail, unless they are redirected elsewhere; if
there is no such output to provide, the implementation need not notify the user of the job's completion.
and
2. This sequence, which demonstrates redirecting standard error to a pipe, is useful in a command procedure (the sequence of output redirection specifications is
significant):
at now + 1 hour <<!
diff file1 file2 2>&1 >outfile | mailx mygroup
!
Using this information I think you should be able to get what you want.
Last edited by Omar007 (2017-08-07 09:46:04)
Offline
Omar007, could you expand on that?
I read the man page, however I'm not sure how either would help me.
Offline
Either read the `at ...` output through mail or wrap the command and redirect the output to a file.
That said, the man page also specifies that the working directory should be the directory from which you called at, so if it did execute, I would expect the file to be created there.
Last edited by Omar007 (2017-08-07 11:44:35)
Offline
What do you expect to "happen"?
run "atq", then with the leading number (the job id), "at -c <number>" and post the output.
(WARNING: this contains your environment. If you fell like you need to censor something, do so *transparently* ie. make clear that you redacted the value. Do not just delete things or silently replace them with random strings)
Offline
The problem seems to have resolved itself..?
On another unrelated matter I restarted the computer, and on startup I was able to get "at" to run the script as expected. The weird things is, that I had already tried to restart while trying trying to solve the "at" problem, so I don't know why the second one mattered.
Anyway, thanks for trying to help.
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline