[PLUG] Temp directory weirdness
Russell Johnson
russ at dimstar.net
Tue Oct 18 21:20:53 UTC 2011
I have a perl script that I wrote that is supposed to query a service, then write the results to a file in the temp directory. It exits, then another script comes along and parses that file at intervals. For weird reasons, I need to do it this way rather than have the parsing script query the service itself.
I have the following routine in my perl script:
sub writetemp {
open (NEWFILE, ">/tmp/$0.count") or die $!;
print NEWFILE "$product{name}.value $product{value} $date";
close (NEWFILE);
}
This works like a champ when I run the script from the command line.
But when I run the script from roots cron, no output file is produced. I've also tried producing the file in a subdirectory within the /root home directory, with the same results.
Anyone have any ideas?
Russell Johnson
russ at dimstar.net
More information about the PLUG
mailing list