Re: cron as root

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

 



Works fine when I run it from the command line, only when root's crontab kicks it off does that error come up.


Jeffrey Ross writes....

>>
>> well, the script I wrote myself and does not call anaconda-ks.cfg
>> anywhere...
>>
>> #!/bin/sh
>>
>> # file locations
>> MAILDIR="/etc/mail"
>> TMPDIR="/tmp"
>> HOME="/home"
>> [...lots more stuff no anaconda-ks.cfg...]


Then this is calling something, that is finally ending up
trying to execute "anaconda-ks.cfg".
And looks like line one.

I suggest putting some "echo" lines in it, and see where it fails.
ie

echo "I AM HERE...."

and keep moving the line down in the logic.

BTW.....you get the same error when you run it manually too, right?


>>
>>
>> > Jeffrey Ross writes....
>> > >
>> > > I created a crontab for root to run a few scripts and upon
>> execution > I
>> > > get the following error:
>> > >
>> > > /bin/sh: line 1: anaconda-ks.cfg: command not found
>> >
>> >Looks like you are trying to run "anaconda-ks.cfg" as a command, and
>> >it's not
>> >there. Not familiar with the file/command "anaconda-ks.cfg", but by
>> >the extension, I'd guess it's a config file of some sort, and
>> >not a Bourne shell script (/bin/sh).
>> >Just a guess.
>> >
>> >What are the first few lines of real code, in the script that your
>> cron >job
>> >is trying to run. (With the exception of the #! /bin/sh on the first
>> >line,
>> >ignore the other lines beginning with #.) Just want to see enough
>> >to get to the "anaconda-ks.cfg" part.
>> >
>> >-- Jay Crews
>> >jpc@jaycrews.com
>>
>>
>> >
>> > I'm betting I'm missing something simple...
>> >
>> > Thanks
>> >
>> > Jeff
>> >
>>
>>
>>
>> --
>> Psyche-list mailing list
>> Psyche-list@redhat.com
>> https://listman.redhat.com/mailman/listinfo/psyche-list
>>



-- Jay Crews
jpc@jaycrews.com








--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux