- Create a new text file somewhere, for example in the root of disk C. Name it "cron.vbs".
- 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
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/", 0Set WinScriptHost = Nothing
WarningPlease, 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 - Go to the Control Panel > Scheduled Tasks.
- Open Control Panel and type "Schedule Tasks" into the search field.
- You will see the "Schedule Tasks" link. Click on it.
- Click the "Create Task" on the right pane.
- 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. - Go to the "Triggers" tab and click "New...".
- 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. - Go to the "Actions" tab and click "New...".
- Click "Browse..." to select cron.vbs.
- Click OK on both windows and you're done with Cron setup.
- 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."
- 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.