I have a php script to report un-registered trunks.
It runs fine when run on the command line and writes debug lines to a log file.
I have added
*/5 * * * * /var/lib/asterisk/agi-bin/trunk_check_registered.php
to /var/spool/cron/asterisk and the cron log /var/log/cron shows it being run every 5 minutes
CROND: (asterisk) CMD (/var/lib/asterisk/agi-bin/trunk_check_registered.php
but it does not actually run.
I cannot find any errors in any log. Nothing is written to the debug log. Simulated trunk errors are not reported.
I have tried adding
> /var/log/debug2.log 2>&1)
at the end of the cron line in the hope there is some output but the file is not created.
The php file is owned by asterisk (and I have tried root) and permissions is set to 0777.
Any suggestions welcome.