Re: crontab - scripts not exiciting.

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

 



looks like it's related to the environmment variables. thanks for the
advise. Will look into howto set the env vars.



On Fri, Mar 11, 2011 at 1:15 PM, Cameron Simpson <cs@xxxxxxxxxx> wrote:
> On 11Mar2011 11:53, Gregory Machin <gdm@xxxxxxxxxxxxxx> wrote:
> | I have a script that needs to run from a cron job. I added the script
> | as explained, in the deployment instructions.
> |
> | crontab -e (root) looks as follows
> |
> | * * * * *  /usr/bin/python /usr/bin/ZabbixApacheUpdater.py -c server1
> | -z 10.24.0.231 > /dev/null 2>&1
>
> Throwing away all the output is a good way to never find out what is
> wrong. Try replacing:
>
>  > /dev/null 2>&1
>
> with:
>
>  >> my-script.output 2>&1
>
> and looking at that file.
>
> [...]
> | But it's not doing anything.
>
> It is probably failing very early.
>
> | When I run the same syntax command from the command line it runs
> | correctly every time.
> | I have tried changing the fill permissions and the syntax of the cron
> | entries but nothing works.
> | Any ideas what I have missed ?
>
> Crons environment is very spartan. Your .[bash_]profile etc have not run
> and so on. Probably an environment variable is missing or too small.
>
> By capturing the output in a file as described you should learn more.
>
> Cheers,
> --
> Cameron Simpson <cs@xxxxxxxxxx> DoD#743
> http://www.cskk.ezoshosting.com/cs/
>
> There are only two types of ships in the NAVY; SUBMARINES and TARGETS !!!
>        - Richard Pierson
>
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux