Skip to content

Project configuration file

David Anderson edited this page Mar 20, 2026 · 9 revisions

A project's configuration is described by a file config.xml in the project's root directory. This file is created, with default values, by the make_project script. You will need to change or add some items during the life of your project.

The format of config.xml file is:

<boinc>
  <config>
    [ configuration options ]
  </config>
  <daemons>
    <daemon>
      <cmd> feeder -d 3 </cmd>
      [ <host>host.domain.name</host> ]
      [ <disabled> 0|1 </disabled> ]
      [ <silent_start> 0|1 </silent_start> ]
      [ <output>filename</output> ]
      [ <pid_file>filename</pid_file> ]
    </daemon>
    ...
  </daemons>
  <tasks>
    <task>
       <cmd> get_load </cmd>
       <output> get_load.out </output>
       <period> 5 min </period>
       [ <host> host.ip </host>       ]
       [ <disabled>  0|1 </disabled>   ]
       [ <always_run> 0|1  </always_run> ]
    </task>
    <task>
       <cmd> run_in_ops update_forum_activities.php </cmd>
       <output> update_form_activities.out </output>
       <period> 1 day </period>
    </task>
    ...
  </tasks>

</boinc>

Project options

These describe a wide range of configuration options. Some are created by the make_project script and you'll never change them.

The list of Project options.

Daemons

Daemons are server programs that normally run continuously, and have to do with job processing. Some of them are supplied with BOINC. Others are per-application and possibly supplied by you.

The list of BOINC-supplied daemons.

The XML entry for a daemon has the following elements:

  • cmd

The command used to start the daemon. Must be a program in the project's bin/ directory.

  • host

Specifies the host on which the daemon should run. The default is the project's main host, as specified in config.xml.

  • disabled

If set to 1, ignore this daemon. Note: <disabled/> won't work; you must specify a number.

  • silent_start

If set to 1, don't print a message at project startup about this daemon. Note: <silent_start/> won't work; you must specify a number.

  • output

Name of output file (in the log_HOSTNAME directory). Defaults to the program name followed by '.log'. If you're running multiple instances of a daemon on one host, you must specify this.

  • pid_file

Name of file used to store the process ID (in the pid_HOSTNAME directory). Defaults to the program name followed by .pid. If you're running multiple instances of a daemon on one host, you must specify this.

Daemons are executed in a directory tmp_hostname/ (not bin/). Daemons are started when you run the bin/start script, and killed (by a SIGHUP signal) when you run bin/stop.

Periodic tasks

Periodic tasks are programs that are run periodically. BOINC provides a number of such programs, performing a variety of functions:

and you can develop your own if needed.

The tasks are executed by the bin/start --cron program, which you should run from cron. To do this, run crontab -e and add a line of the form

0,5,10,15,20,25,30,35,40,45,50,55 * * * * HOME/projects/PROJECT/bin/start --cron

Periodic tasks should be short-running, but in case they aren't, the start script detects when an instance is still running and doesn't start another instance.

Tasks are described by XML elements with the following fields:

  • cmd

The command used to perform the task. Must be a program in the project's /bin directory.

You can run PHP scripts as periodic tasks. These scripts must be in the html/ops/ directory, and can be run with a command of the form

run_in_ops scriptname

The script should be executable, and should have the form

<?php
...
?>

You must specify the output file for such tasks (otherwise it will go to run_in_ops.out).

  • host

Specifies where the daemon should run. The default is the project's main host, as specified in config.xml.

  • period

The interval between executions, expressed as a single number (in units of minutes) or a number followed by 'seconds', 'minutes', 'hours', or 'days' (may be abbreviated to unique initial string).

  • output

Specifies the output file to output; by default it is COMMAND_BASE_NAME.out. Output files are in log_X/, where X is the host.

  • disabled

Ignore this entry

  • always_run

Run this task regardless of whether or not the project is enabled (for example, a script that logs the current CPU load of the host machine).

Clone this wiki locally