I have below scripts as php file and want to execute this in CRON. It works in local but when I go remote linux it fails.
<?php
$a = 1;
$b = 2;
$b = $a + $b;
echo 'TEST-SUM'.$b;
//echo substr("Hello world!",6);
//echo 'Test Cron Job On Mturk!';
?>
1) The above one works in this way of execution in REMOTE server.
php test.php
2) But not using the following cron syntax:
* * * * * php /home/www/cronjob/test.php 2>&1 >> /home/test/www/cronjob/createhitlog.log
I am trying to check whether CRON is working on the REMOTE server or not.
You seem confused about remote and local.
This would be running it locally:
This would be an example of running it remotely with a cron:
Of course this remote usage implies security implications that you’d need to address.