Documentation 3.04
Prev: 3.03 Site PrefsNext: 3.05 Maintenance
Cronmaster
Because PHP lacks scheduled execution capabilities, dadaIMC relies on a single cron job, defined within the operating system, to execute scheduled tasks.
You must properly configure this cron job to ensure that your site will run properly — emptying the cache periodically, refreshing content, sending notifications, etc.
The one cron job you need to define, either on the root user of the OS or the user your site is owned by, is
*/10 * * * * /usr/bin/curl -s -S -m 1200 -y 50 -Y 20 http://[your.site.url]/cronmaster.php >> /var/log/cronmaster.log 2>&1
You may configure the "cronmaster.log" to any directory with proper permissions (perhaps the "/logs/" directory in your site. This command tells your server to use the "curl" program to hit the "cronmaster.php" page on your site every 10 minutes. To prevent anyone from hitting "cronmaster.php" manually, the cronmaster.php script will allow ONLY the server to execute the commands on the page. In technical terms, it checks to see the the $_SERVER['REMOTE_ADDR'] variable (the visitor) matches the result of gethostbyname($_SERVER['HTTP_HOST']). If your server is configured with multiple IP addresses, it is possible that these two will not match. If that is the case, you must hard-code the proper IP address in place of the gethostbyname($_SERVER['HTTP_HOST']) variable.
Specific tasks in dadaIMC are broken down into 5 categories:
- Scripts executed every 10 minutes (e.g. remote uploading of media)
- Scripts executed hourly (whenever the HOUR changes)
- Scripts executed daily (whenever the DATE changes)
- Scripts executed weekly (whenever the WEEK OF THE YEAR changes)
- Scripts executed monthly (whenever the MONTH changes)
Each module can have its own series of cron jobs, and all are listed on the cronmaster page.
If you are running multiple IMC sites on a single server, you may want to alter the main cron job to prevent all the sites from executing their scripts at the same time. Rather than using "*/10" for the first parameter (every 10 minutes), specify the minutes of the hour you want the script to run as a list, e.g. "0,10,20,30,40,50". That way, you can configure another site to use "1,11,21,31,41,51", etc. and you can support up to 10 IMCs without attempting to execute the scripts simultaneously.
Report Bugs
dadaIMC uses the Mantis bug-tracking system for bug reporting. Please use it! And check for existing reports of your bug before submitting a new one.
CVS
The current CVS version of dadaIMC is now browseable online. Be forewarned, though, that it is not always in a useable state as-is!
