On Dec 22, 2008, at 10:41 AM, James Pulver wrote: > Hmmm, so far I'm getting NAN - I'm wondering, does this script > handle 0 > licenses checked out? Holidays are slow, so few licenses are checked > out > (often 0). Alternatively, I've messed up my cron - how does this look: > 0,5,10,15,20,25,30,35,40,45,50,55 * * * * zenoss python > /opt/zenoss/libexec/licenseEventCheck.py > > I'm also assuming the search string will find "MATLAB" from the line > WHERE summary LIKE '%%MATLAB%%'" > > or do I need the double quotes in ther also?
You're probably getting NaN because the run succeeded when you tried it by hand, but not when cron runs it due to a problem with the environment. Try the following cronjob in the zenoss user's crontab instead. 0,5,10,15,20,25,30,35,40,45,50,55 * * * * bash -lc "/opt/zenoss/ libexec/licenseEventCheck.py" Make sure the licenseEventCheck.py is executable. _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
