Friday, September 13, 2013

how to set cron job scheduler php page execute

1 step -> Go to control planel
2step ->click Cron job
3step-> create standard cron job scheduler
4step-> put you scheduler  time to execute
last step -> put application directory root path with page  your command "input box" then click  ok example below
simple create sendemail.php

PHP example: check your php version on server then get path like :<?php  echo getcwd(); ?>

Command to run for a PHP5 cron job:
Command to run for a PHP4 cron job:

How does i execute Cron job using browse direct URL

$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://sadf/profiles/emailalert");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser

// close cURL resource, and free up system resources
echo "execute by curl ok and sending mail";
echo "not execute curl funation";

No comments:

Post a Comment