• Setup Cron job on Windows 7/Vista/2008

    Setup Cron job on Windows 7/Vista/2008

     

    1. Create a new text file somewhere, for example in the root of disk C. Name it "cron.vbs".
    2. Put these lines into the file with the replacements specified below:

      Set WinScriptHost = CreateObject("WScript.Shell")

       

      WinScriptHost.Run "%PATH-TO-PHP%\php.exe %PATH-TO-KMP%\admin\CRON\cron.php %URL-TO-KMP%/", 0

      Set WinScriptHost = Nothing

       


      Replace %PATH-TO-PHP% with path to php executable file (php.exe). Be sure to use "php.exe", not the "php-cgi.exe"!

      Replace %PATH-TO-KMP% with physical path (not URL) where you have installed KnowledgeBase Manager Pro.

      Replace %URL-TO-KMP% with URL to location where you have installed KnowledgeBase Manager Pro (if open this URL in your browser, you'll see the front-end part of your knowledge base). Please note that website name should not be "localhost", otherwise you would get incorrect URLs in emails that KMP sends - users won't be able to open articles they are subscribed to, etc.

      Example #1:

      Set WinScriptHost = CreateObject("WScript.Shell")

       

      WinScriptHost.Run "C:\PHP\php.exe c:\inetpub\wwwroot\kmp\admin\CRON\cron.php http://www.yourwebsite.com/kmp/", 0

      Set WinScriptHost = Nothing

      Example #2 (if PHP and/or KMP path contains whitespaces - in this case, you need to take path to double quotes):
      Set WinScriptHost = CreateObject("WScript.Shell")
      WinScriptHost.Run """C:\Program Files\PHP\php.exe"" ""C:\Inetpub\Some Folder\kmp\admin\CRON\cron.php"" http://www.yourwebsite.com/kmp/", 0
      Set WinScriptHost = Nothing
       

      Warning

      Please, do not forget the slash at the end of the last parameter for the php.exe.

      This is correct:

      http://www.yourwebsite.com/kmp/

       

      This is incorrect:

      http://www.yourwebsite.com/kmp

       

    3. Go to the Control Panel > Scheduled Tasks.
    4. Open Control Panel and type "Schedule Tasks" into the search field.



    5. You will see the "Schedule Tasks" link. Click on it.
    6. Click the "Create Task" on the right pane.



    7. Give it an appropriate name, e.g. "KMP Cron Task" and set the "Run whether user is logged on or not" radio-button.



       You may want to change user under whom the scheduled task will run.

    8. Go to the "Triggers" tab and click "New...".
    9. Set checkbox on "Repeat task every" and enter "1 minutes" to the next dropdown menu (there is no "1 minutes" item, but you can easily enter it from keyboard).



      Click OK.

    10. Go to the "Actions" tab and click "New...".
    11. Click "Browse..." to select cron.vbs.
    12. Click OK on both windows and you're done with Cron setup.
    13. Open the KMP control panel and go to Administration > General Settings > Auto Related Articles. You may see the following message there previously: "You have to setup cron script in order to use this functionality."


    14. This message will disappear after the first run of the Cron script. Click "Recheck"  in about a minute to see that Cron job has been successfully installed.



     

     

    河南互联网络信息有限公司成立于1996年,是经工商行政管理局批准的专业互联网络公司。公司经营范围主要包括政府、企业和事业单位上网工程、计算机网络工程、域名注册、虚拟主机、beplay体育在线建设、电子商务和互联网增值服务等。

    联系方式

    地址:河南省郑州市经五路2号

    电话:0371-63520088 

    QQ:76257322

    beplay体育在线:www.800188.com

    电邮: 该 Email 地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。