Forum

cron cannot find files

Fred
12 December 2016, 00:23
Hi Hugo,

I finished installing the Hiawatha Monitor on Hiawatha 10.3 and added entry to point to the monitor on all my webserver..
I can access the web panel with no problem..

I then ran crontab -e and added the follwoing:
# hiawatha
*/5 * * * * /usr/local/www/production/hiawatha/monitor/database/fetch_webserver_logs
0 0 * * * /usr/local/www/production/hiawatha/monitor/database/delete_old_logs
59 23 * * * /usr/local/www/production/hiawatha/monitor/database/send_reports

Eevry 5 minutes, I get an email from the server with the following:
/usr/local/www/production/hiawatha/monitor/database/fetch_webserver_logs: not found

The file does exist:
 ll /usr/local/www/production/hiawatha/monitor/database/
total 244
-rwxr-xr-x 1 www www 625 Jun 13 2015 backup_database*
-rwxr-xr-x 1 www www 1572 Jul 6 2015 delete_old_logs*
-rwxr-xr-x 1 www www 12407 Jan 31 2016 fetch_webserver_logs*
-rwxr-xr-x 1 www www 304 Jun 13 2015 flush_cache*
-rw-r--r-- 1 www www 16538 Sep 3 2015 mysql.sql
-rwxr-xr-x 1 www www 1822 Jun 13 2015 private_pages*
-rwxr-xr-x 1 www www 8705 Dec 22 2015 send_reports*

The cronlog isn't really usefull..

Do I need to do anything specific when the monitor is in FreeBSD jail?
Fred
12 December 2016, 10:01
solved problem by changing the first line of code from
#!/usr/bin/php
to
#!/usr/local/bin/php
.

I no longe receiving email with 'not found' error message
This topic has been closed.