[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Possible bug with atd?

On 03/03/2006, at 5:03 AM, Jason Vas Dias wrote:
On Thursday 02 March 2006 12:53, Steven Haigh <netwiz crc id au> wrote:
 Hi all,

 I'm not 100% sure if this is a bug, or something I'm doing wrong...

I'm trying to schedule some dvb recording via a web page using atd. I can get the jobs to appear in 'at -l', however when it comes time for
 the job to execute, it just disappears. *poof* gone. No logs, no
 command executed, no nothing.

 I'm trying to launch a bash file that does a heap of funky things -
 but not having much luck. If i type in the command manually, it all
 works like a treat.

 I am setting the job in PHP by using:
 $cmd = "at $starttime $whatday << COMMAND\n/home/netwiz/bin/capture
 '$channel' $duration\nCOMMAND";
You are submitting the job as userid 48, gid 48 -
does the command normally work OK as a non root userid ?
(The device read by the "capture" command must have appropriate
 privileges if you're not running it as root -
 which device / what privileges?)
Does the at-job work if submitted as root ?
Do you have SELinux in Enforcing mode ?
If so, does the at job work after doing 'setenforce 0' ?
Try changing the command to:
  /home/netwiz/bin/capture '7 HD Digital' 30 || echo "FAILED: $?"
that should generate some mail with the exit status if it fails.

Ok, I found the issue - it was actually a multiple of things that I'd overlooked. I wasn't getting the email because sendmail wasn't started on that machine - which when I started, I got a flood of email hit my inbox - logwatchs' from 4 days ago etc :)

it turns out that because apache has a limited PATH, one of the commands (zapdvb to be exact) lived in /usr/local/bin - however this wasn't in apache's path for the at job. So, I added the full path name to the script, and now everything works.

Sorry about the false alarm - it's something dead simple that I'm embarrassed I overlooked :)

Steven Haigh

Email: netwiz crc id au
Web: http://www.crc.id.au
Phone: (03) 9017 0597 - 0412 935 897

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]