Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Setup Cron job in Plesk and other hosting control panels

Author: Edward Hardin Reference Number: AA-00486 Views: 23146 Last Updated: 01/04/2011 04:20 PM 25 Rating/ 2 Voters

This guide tells you how to setup Cron job in Plesk. 

Even if you're using a different hosting administration tool, you can use this article as a general guide to Cron job setup. Although screenshots may look differently, general directions on Cron job setup are commonly the same.

  1. Click on the "Domains" on the left pane and then select the domain with Knowledgebase Manager Pro on the right.
  2. Find the "Scheduled Tasks" button under the "Additional Tools" section and click on it.



  3. Select the system user under whom the scheduled task should be run.



  4. Click the "Schedule New Task" button.



  5. Set the "Switched on" checkbox and input an asterisk (*) for Minute, Hour, Day of the Month, Month, and Day of the Week.
  6. Add the following line to the "Command" field with the replacements below:
    %PATH-TO-PHP% %PATH-TO-KMP%/admin/CRON/cron.php %URL-TO-KMP%

    Replace %PATH-TO-PHP% with path to PHP executable file. If you don’t  know the path to PHP, then you can ask your server admin. Here are some examples of possible paths to PHP:

    /usr/bin/php
    /usr/local/bin/php

    Replace %PATH-TO-KMP% with physical path (not URL) where you have  installed KnowledgeBase Manager Pro. If you know the path to your  account, then you can simply add the remainder of the path to your  actual script e.g. /home/user1/public_html might be the path to your  account (document root) and the script might be in  kmp/admin/CRON/cron.php resulting in  /home/user1/public_html/kmp/admin/CRON/cron.php

    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).

    Example:

    /usr/bin/php /usr/www/kmp/admin/CRON/cron.php http://www.mywebsite.com/kmp/
    Warning

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

    This is correct:

    http://www.mywebsite.com/kmp/

    This is incorrect:

    http://www.mywebsite.com/kmp



  7. 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."



  8. 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.



Alternative cron command

There is also another way to run KMP cron. You can do this via wget. Use it if the example above doesn't work for you for some reason.

Format:

wget -q %URL-TO-KMP%/admin/CRON/cron.php 1>/dev/null 2>&1

Example:

wget -q http://www.mywebsite.com/kmp/admin/CRON/cron.php 1>/dev/null 2>&1