Denbun POP version Manual
User's Manual | Administrator's Manual | Installation Guide | Initial Settings Guide
Back to Menu
 

■Configuring the scheduler

This section describes the settings that need to use "Automatic Receiving" function of Denbun.
If you use the "Automatic Receiving" function, you should run scheduler program on your server.
What is the scheduler?
Once the scheduler runs (please refer how to run in the next section) on the server, it executes "Automatic Receiving" function automatically at the specified time.
How to run the scheduler?
You can run the scheduler only once when you run the server.

Even if you run the scheduler again, it does not run.
You can find the following file in the installation directory of Denbun.

Scheduler program "dnpscheduler"
1. Scheduler program
The command line options of the scheduler.

dnpscheduler "the installation directory of Denbun" interval

Specify the interval at which it receives messages in minute (every 5 minutes).
For example, the installation directory is "/var/www/cgi-bin/dnpwml" and the interval is five minutes;
      dnpscheduler /var/www/cgi-bin/dnpwml 5

You can find a shell script file (dnpscheduler.sh) in the installation directory.
[root@xxxxxx ~]# vi /var/www/cgi-bin/dnpwml/dnpscheduler.sh
#!/bin/sh

export LD_LIBRARY_PATH=/usr/local/pgsql/lib:/var/www/cgi-bin/dnpwml/lib
/var/www/cgi-bin/dnpwml/dnpscheduler /var/www/cgi-bin/dnpwml 5

Edit the sample file to meet your operating environment.
2. Running the scheduler automatically
To run the scheduler automatically when the server is started, configure "/etc/rc.d/rc.local" file or use cron to run the scheduler at the specified interval. First of all, set an editor to edit crontab. This step requires the super user (root).

[guest@xxxxxx ~]$ su
Password:
[root@xxxxxx guest]# export EDITOR vi

Edit crontab and schedule.
To open cronrab, use the following command.
[root@xxxxxx guest]# crontab -u apache -e
In "apache", you should specify the user who provides HTTP service.

[Edit crontab (example)]
30 8 * * 1,2,3,4,5 /var/www/cgi-bin/dnpwml/dnpscheduler.sh
In this example, run the scheduler at 8:30 AM from Monday to Friday.
Please refer the OS documentation for Cron command.



 
Copyright (C) NEOJAPAN Inc. All Rights Reserved.