diff --git a/setup/scripts/rcron.php b/setup/scripts/rcron.php index 53c2da007f91ab84007afcc20409b32a8da822ed..a15a152ec910104d157faa2b9ab6971a1b7361bd 100755 --- a/setup/scripts/rcron.php +++ b/setup/scripts/rcron.php @@ -16,12 +16,12 @@ **********************************************************************/ # Configuration: Enter the url and key. That is it. -# url => URL to api/task/cron e.g http://yourdomain.com/support/api/task/cron +# url => URL to api/task/cron e.g http://yourdomain.com/support/api/tasks/cron # key => API's Key (see admin panel on how to generate a key) # $config = array( - 'url'=>'http://yourdomain.com/support/api/task/cron', + 'url'=>'http://yourdomain.com/support/api/tasks/cron', 'key'=>'API KEY HERE' ); @@ -32,8 +32,8 @@ function_exists('curl_version') or die('CURL support required'); set_time_limit(30); #curl post -$ch = curl_init(); -curl_setopt($ch, CURLOPT_URL, $config['url']); +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, $config['url']); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); curl_setopt($ch, CURLOPT_USERAGENT, 'osTicket API Client v1.7'); @@ -41,7 +41,7 @@ curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Expect:', 'X-API-Key: '.$config['key'])); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); -$result=curl_exec($ch); +$result=curl_exec($ch); curl_close($ch); if(preg_match('/HTTP\/.* ([0-9]+) .*/', $result, $status) && $status[1] == 200)