perl script-cron fails, at and command line work
I just re-installed fresh from 4.5 to 4.6. I now have a problem with a script that ran from cron for many months without problems. From cron I get: Logfile LWP_SupeRref.log failed to open at /home/user/LWP/LWP_ref.pl line 73. I have tried altering permissions, deleting file, touching file, etc This script works just fine from command line and also using at command -- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. -- Robert Heinlein
Re: perl script-cron fails, at and command line work
Chris Bennett wrote: I just re-installed fresh from 4.5 to 4.6. I now have a problem with a script that ran from cron for many months without problems. From cron I get: Logfile LWP_SupeRref.log failed to open at /home/user/LWP/LWP_ref.pl line 73. I have tried altering permissions, deleting file, touching file, etc This script works just fine from command line and also using at command Are you *sure* you know what directory the log file is being created in? If the script is writing to default/current directory; perhaps your cron environment has changed.
Re: perl script-cron fails, at and command line work
Frank Bax wrote: Chris Bennett wrote: I just re-installed fresh from 4.5 to 4.6. I now have a problem with a script that ran from cron for many months without problems. From cron I get: Logfile LWP_SupeRref.log failed to open at /home/user/LWP/LWP_ref.pl line 73. I have tried altering permissions, deleting file, touching file, etc This script works just fine from command line and also using at command Are you *sure* you know what directory the log file is being created in? If the script is writing to default/current directory; perhaps your cron environment has changed. Yes I messed up writing the new crontabs. I pulled out the old ones from archived copy of /var/cron/tabs This one was the only one that that affected, but I did the same error for several, now all are fixed -- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. -- Robert Heinlein
Re: perl script-cron fails, at and command line work
Frank Bax wrote: Chris Bennett wrote: I just re-installed fresh from 4.5 to 4.6. I now have a problem with a script that ran from cron for many months without problems. From cron I get: Logfile LWP_SupeRref.log failed to open at /home/user/LWP/LWP_ref.pl line 73. I have tried altering permissions, deleting file, touching file, etc This script works just fine from command line and also using at command Are you *sure* you know what directory the log file is being created in? If the script is writing to default/current directory; perhaps your cron environment has changed. Doesn't cron runs as a service, hence simple environment? If you have a link in the path, try using the real (full) path. I remember icewm which need the full path, starting from /