No big deal, John -- a foolproof way is to create a cron job that just does "/bin/echo $PATH > /var/log/cronpath" and check that file :)
I usually just try to avoid the headache of assuming cron's path to include *anything*, and either start out by setting the path in my script, or I include the full path to applications (admittedly, the first option is probably the "right way" to do it... copy the path from an environment where the script is known to run correctly, i.e. your login's default path.) On Wed, Mar 18, 2009 at 6:27 PM, BluesRenegade <[email protected]> wrote: > Daniel, > > How does one determine the PATH that crond runs under? I guess it's the > PATH that's set at that point of the system startup when the crond daemon is > run. Any suggestions? > > Determining the state of the system at any point of the startup has caused > me headaches before. > > TIA! > John > > Daniel Eggleston wrote: > > I'm with Jeremiah -- I've been bitten by path issues many times myself > -- cron gives you a more limited path than you have on a system login. > > So, you can try setting the path in the file, or calling all the > executables by full pathname. > > Or, just post the whole thing here and someone will probably be able to fix > it. > > On Wed, Mar 11, 2009 at 9:17 PM, Jeremiah Bess <[email protected]> > wrote: > > > Sounds like the shell that is running the rate.sh doesn't have the variable > set for your 99.08 value. Where is that variable set, in the rate.sh file? > If so, can you post the rate.sh here so we can look at it? > > Jeremiah E. Bess > Network Ninja, Penguin Geek, Father of four > > > On Wed, Mar 11, 2009 at 19:01, Nelson Serafica <[email protected]> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I just created a script that when run, it will output the ff: > > [r...@smtp01 intigrix]# /var/intigrix/rate.sh > /var/intigrix/rates.txt > [r...@smtp01 intigrix]# cat rates.txt > 0,,99.08,0,OK > > 99.08 is a variable while the rest including 0 is a fixed values. > > The problem is when I already put it in crontab, it only display the ff: > > 0,,,0,OK > > The 99.08 is missing. My entry in crontab is the ff: > > */1 * * * * /var/intigrix/rate.sh > /var/intigrix/rates.txt > > Is there a limitation in cron daemon? Just remember that when I do the > commands in shell, it is ok but when I put it in cron, it has no values. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkm4XwQACgkQUZICHAVQ58rWewCeKGOUehuV8CuFzCqudKKkcLJh > 60MAni4OpVY5+YKrxhPCUlW+Fw8TV+SN > =7AWu > -----END PGP SIGNATURE----- > > > > > > > > > > > -- Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
