Home Learn More Purchase Knowledge Base Support Contact

Search:     Advanced search

Setting up scheduled tasks

Article ID: 238
Last updated: 09 Feb, 2010
Add comment
Views: 1612
Comments: 0

Important: You must schedule tasks

Some parts of KBPublisher simply will not work if you do not schedule tasks. This includes:

  • Reports. You will not be able to run reports
  • Subscription processing. Users will not be notified when items are added or changed  
  • Scheduling. You will not be able to schedule article, news or files
  • Optimization. Database tables will not be checked/repaired/optimized
  • Synchronization. Article and file hits will not be synchronized
  • Administration. Some system jobs will not run.

How do I schedule tasks?

You can configure scheduling through the Unix crontab command, through scheduled tasks in Windows, or through  the Control Panel provided by your service provider.

When scheduling tasks for KBPublisher there are several files you must run periodically. 

The files to be scheduled are:

  • admin/cron/freq.php - every 5 minutes
  • admin/cron/hourly.php - hourly
  • admin/cron/daily.php - daily, just after midnight
  • admin/cron/weekly.php - weekly
  • admin/cron/monthly.php - monthly

1. By 'crontab' on Unix

# every 5 minutes
*/5 * * * *   /usr/local/bin/php [KBP_DIRECTORY]/admin/cron/freq.php

# hourly
0 * * * *    /usr/local/bin/php [KBP_DIRECTORY]/admin/cron/hourly.php

# daily, after midnight
01 0 * * *    /usr/local/bin/php [KBP_DIRECTORY]/admin/cron/daily.php

# weekly
10 0 * * 0   /usr/local/bin/php [KBP_DIRECTORY]/admin/cron/weekly.php

# monthly
20 0 1 * *   /usr/local/bin/php [KBP_DIRECTORY]/admin/cron/monthly.php

where /usr/local/bin/php is the path to the PHP interpreter, it could differ on your system (you can get it by running 'which php' on command shell),
and [KBP_DIRECTORY] is the absolute path to your KBPublisher installation directory (e.g. '/home/user_name/www/kb').  Replace it with your value.

OR
# every 5 minutes
*/5 * * * *   /usr/bin/curl -s http://example.com/kb/admin/cron/freq.php

# hourly
0 * * * *    /usr/bin/curl -s http://example.com/kb/admin/cron/hourly.php

# daily, after midnight
01 0 * * *    /usr/bin/curl -s http://example.com/kb/admin/cron/daily.php

# weekly
10 0 * * 0   /usr/bin/curl -s http://example.com/kb/admin/cron/weekly.php

# monthly
20 0 1 * *   /usr/bin/curl -s http://example.com/kb/admin/cron/monthly.php


You can insert these crontab records by executing 'crontab -e' and editing cron jobs manually, or you can create a file (kbp_cron.txt) containing these lines and execute 'crontab kbp_cron.txt' from shell (WARNING: all existing records in crontab will be removed!).

2. By 'Scheduled Tasks' on Windows

Instead of cron on Windows you can use Scheduled Tasks. Contact your system administrator or hosting provider for additional details.

3. By Control Panel

This depends very much on your hosting provider. You should consult their documentation.


Notes:
  • admin/cron/freq.php should be run every 5 minutes
  • admin/cron/daily.php should be run just after midnight.

---------------------------------------------------------
This functionality works in version 3.5 only

This article was:   Helpful | Not Helpful Add comment
Prev   Next
Installing ionCube loader     Getting started


© 2008 Double Jade LLC | customer.service@kbpublisher.com