Search the Community
Showing results for tags 'cronjobs'.
Hello everyone, I'm new to this forum, I have the next problem I hope someone can advise. I have a php script I need to run from cronjobs. This script contains some commands shell_exec, fairly simple and the output is directed to a file, from the webmin module cronjobs goes well but when running from cron, the commands shell_exec stops working the cronjob is * * * * * php /some/path/myscript.php to make it easy #!/usr/bin/php -q <?php $iptables=shell_exec('iptables -S '); $file_name="/some/path/out_test.txt"; $ar=fopen("$file_name","w"); fputs($ar,$iptabl