Online Shopping Cart Software
Talk to a sales representative 1-800-506-0398
 

Setting up Task Scheduler on windows servers for 3.6.3 security changes.

  Article related to 3.6.4 and below versions. This may also work with the 3.7 series

WINDOWS

To setup a cron job on a WINDOWS server use following command in task scheduler:
 
[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:
  1. Go to Server > Scheduler Tasks.
  2. Click Add New Task.
  3. Leave the Switched on checkbox selected if you want your scheduled task to be active immediately after the creation.
  4. Input a name for your task in the Description field.
  5. In Scheduler notification, specify whether the scheduler should notify you when it runs this task. The following options are available:
    1. * 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.
  6. Specify the command [path to your website]\curl_wrapper.php with no Arguments in the Arguments field.
  7. Select the appropriate priority in the Task priority field. Task priority can be set to Low, Normal or High.
  8. Specify when to run your command by selecting the appropriate checkboxes in the Hours, Days of Month, Months or Days of Week fields.
  9. 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 ****
   


User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.