The Centova Cast cron jobs are configured in a separate crontab file named /etc/cron.d/centovacast. This file should (as of the time of this writing) contain the following jobs:
- Service monitor
*/5 * * * * root /etc/init.d/centovacast check >/dev/null 2>&1
This job is responsible for monitoring the core Centova Cast application processes (excluding your clients' stream processes). This job should not be altered.
- System log rotation
15 2 * * * root /usr/local/centovacast/sbin/rotatelogs >/dev/null 2>&1
This job is responsible for rotating the core Centova Cast application logs (excluding your clients' stream logs).
- Media library updater
* * * * * ccuser /usr/local/centovacast/bin/mediascan >/dev/null
This job is responsible for monitoring the Centova Cast FTP server for uploads and, when necessary, updating your clients' media libraries. This job should not be altered.
- Task scheduler
*/5 * * * * centovacast /usr/local/centovacast/bin/ccmanage cronjob all >/dev/null
This job serves as a "master" task scheduler for all other tasks which Centova Cast needs to perform. The configuration of the individual tasks is described in the next section.
Task Scheduler
The majority of Centova Cast's internal scheduled tasks are handled through the task scheduler rather than via separate tasks in the crontab.
The scheduling parameters for these tasks are configured in the Centova Cast MySQL database. Because these are not intended to be modified (except by advanced users), there is no user interface for modifying the scheduling parameters; the only way to alter them is by editing the database directly.
WARNING: Altering the scheduled task parameters is officially unsupported and may damage your Centova Cast installation, reduce its reliability or negatively impact its performance. Any such changes are made at your own risk, and our staff cannot assist you with any issues arising as a result of such changes.
Advanced users who are comfortable working directly with MySQL can find the scheduled task parameters in the cronjobs table of the Centova Cast database. The precise list of available scheduled tasks may change between Centova Cast versions but the fundamental structure and content of the table should be similar to:
+----------------+-----------+---------+----------+ | name | frequency | enabled | priority | +----------------+-----------+---------+----------+ | updatenews | 4320 | 1 | 10 | | checkprocesses | 1 | 1 | 20 | | logrotate | 720 | 1 | 30 | | logprocess | 720 | 1 | 31 | | hourlymaint | 60 | 1 | 40 | | pollhosts | 30 | 1 | 50 | +----------------+-----------+---------+----------+
The table columns include:
- name: The name of the scheduled task. Do not change this.
- frequency: Specifies the frequency, in minutes, at which the scheduled task should be executed. Note that regardless of this setting, the task will never be executed more often than the frequency configured in /etc/cron.d/centovacast for the task scheduler itself.
- enabled: Specifies whether or not the scheduled task should be executed. Set to 0 to disable the task.
- priority: Specifies the order in which the tasks are executed; lower values execute before higher values. Tasks are prioritized in a specific order for internal reasons and the priority should not be altered.
- laststart: (Not shown above.) Indicates the time at which the job was last started. This field is updated automatically by Centova Cast and should not be altered manually.
- lastcompleted: (Not shown above.) Indicates the time at which the cron job last completed. This field is updated automatically by Centova Cast and should not be altered manually.
The scheduled tasks available (at the time of this writing) include:
- updatenews: Retrieves news from the Centova Technologies web site for display in the Centova Cast admin area.
- checkprocesses: Checks clients' streaming server/autoDJ processes for problems and restarts them as needed.
- logrotate: Rotates clients' log files to ensure that they remain at a reasonable size. For best performance the frequency of this task should remain identical to the frequency of the logprocess task.
- logprocess: Processes clients' log files to extract statistics and update data transfer information.
- hourlymaint: Cleans up the Centova Cast database and performs various periodic optimizations.
- pollhosts: Tests connectivity to any Centova Cast slave servers configured under Management->Hosts.