You are not logged in.
Hi!
Well, I'm stuck, I can't seem to figure how to run a command with "at"....
The atd daemon is running:
"daemon 5060 0.0 0.0 10172 484 ? Ss 21:09 0:00 /usr/sbin/atd"
I've created an /etc/at.allow file, with my username.
So, I'm trying:
at -f /home/mathieu/fg.sh -v 22h35
The atq command list my job:
23 Thu Oct 27 22:35:00 2011 a mathieu
But, when 22h35 comes, well nothing happens.
I've also tried with the at prompt, without luck...
(and the script is marked as executable)
Any idea what I'm doing wrong?
Last edited by haiku (2011-10-29 08:03:01)
Hasta la Singularidad Siempre
Offline
No messages logged in /var/log/messages or /var/log/everything with an explanation?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Is fg.sh a bash script or a sh script? AFAIK, cron expects sh and doesn't like bash; maybe you have the same problem with `at'?
Offline
The only messages in /var/log/everything that maybe related are:
Oct 27 22:03:53 localhost atd[5504]: Cannot change to /var/spool/atd: Permission denied
[I've tried launching "at" as root, without success]
and this one, but that wouldn't prevent anything:
Oct 27 22:01:00 localhost atd[5454]: Exec failed for mail command: No such file or directory
Nothing in /var/log/messages.
fg.sh is a bash script (actually, just a "echo" command, for testing)
I've also tried to launch echo directly with at, like:
$at 22h40
>at echo "test"
>at <EOT>
without any result..
Hasta la Singularidad Siempre
Offline
I created a sh script called fg.sh and found the following:
Remember to use absolute path names eg /bin/echo;
Remember to make fg.sh executable;
I had to use sudo (but I don't have an at.allow file so maybe you don't need to worry - but you could use sudo until you know you at least have something working);
Direct the result to a file or something - attempting to use echo without redirecting the output anywhere didn't produce any (visible) results for me, but the file appeared when told to.
Caveat: I'm stuck on an ubuntu machine at the moment so ymmv.
Offline
Well, it worked (as a regular user) with the redirection - thanks!
Hasta la Singularidad Siempre
Offline
I think you need to list your user name in /etc/at.allow. Maybe that will allow you to avoid the redirection shenanigans.
In case you are wondering what happened to your post, at 19:50, I bet you hit the "Report" button rather than the "Reply" button and accidentally reported this thread to the mods. It happens all the time.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline