|
|
[path to your website]\curl_wrapper.php
Then you would edit the curl_wrapper.php file with the full url to the
script as shown in the example code below using the attached download.
function get_data($url){
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$returned_content = get_data('http://www.domain.com/content/admin/cron/security_update_cron.php') ;
echo $returned_content;
To schedule a task in Windows using PLESK:
- Go to Server > Scheduler Tasks.
- Click Add New Task.
- Leave the Switched on checkbox selected if you want your scheduled task to be active immediately after the creation.
- Input a name for your task in the Description field.
- In
Scheduler notification, specify whether the scheduler should notify you
when it runs this task. The following options are available:
* Switched off - do not nofity you. * Send to the default e-mail - send the notification to your default e-mail address. *
Send to the e-mail I specify - send the nofitication to the e-mail
specified in the corresponding field. After selecting this option, you
need to input the required e-mail in the field on the right. * Click Set to save scheduler notifications settings. -
Specify the command [path to your website]\curl_wrapper.php with no Arguments in the
Arguments field.
- Select the appropriate priority in the Task priority field. Task priority can be set to Low, Normal or High.
- Specify
when to run your command by selecting the appropriate checkboxes in the
Hours, Days of Month, Months or Days of Week fields.
- Click OK to schedule the task or click Run Now to schedule the task and immediately run it.
**** Note, it is recommended to run this once every 24 hours ****
|