Just another Perl shrine | |
PerlMonks |
Re: file open problem with scheduled jobsby tachyon (Chancellor) |
on Jul 21, 2004 at 23:08 UTC ( [id://376408]=note: print w/replies, xml ) | Need Help?? |
I suspect the problem is that you are specifying a relative path ie file.log and expecting that after the detach you will still be in the same dir. You are not. Like all good daemons Schedule::Cron is doing a chdir '/' (so you can unmount parts if the FS) ie:
As a result if you are in /some/dir and try to write to file.log when you don't detatch you are trying to write /some/dir/file.log whereas after detaching you you would try to write /file.log ie in root where user nobody won't have perms. I further suspect that you are not checking the return value of your open, because with STDERR still open you should be seeing the permission denied message.
FWIW This module has not been updated since 2000 so the author appears to have lost interest given there is a TODO list. No reason not to use it and the code looks well sorted, just don't expect any new features anytime soon. cheers tachyon
In Section
Seekers of Perl Wisdom
|
|