I have spend hours to search about cron execution using php but nothing works for me...i want to execute my php script after every 30 minute.. this is myscript.php
<?php
date_default_timezone_set("Asia/Calcutta");
$datetime=date("Y-m-d G.i:s", time());
file_put_contents("aaaaa.txt", "The current time is: $datetime\r\n", FILE_APPEND);
?>
and the script I am using to execute cron command...is crontest.php
</php
$abc=array();
$dir=dirname(__FILE__);
echo exec("'*/30 * * * * /bin/usr/php $dir/myscript.php' 2>&1", &$abc);
echo $output;
?>
I have tried many different command... like..
"'crontab -l */30 * * * * /bin/usr/php $dir/myscript.php' 2>&1"
"'crontab -l */30 * * * * php myscript.php' 2>&1"
but nothing goes in my way..I cant understand what else I can do.. Please someone help, please On executing crontest.php I am getting error "sh:*/30 * * * * /bin/usr/php /home/content/71/9988871/html/examples/myscript.php: No such file or directory"