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年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
 

联系方式

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

电话:0371-63520088 

QQ:76257322

网站:800188.com

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

微信:用企业微信联系