*ABOUT* tcrond is a cron-like daemon that executes scripts or programs at arbitrary periods (granulated in seconds) and arbitrary offsets from the period boundary that are synchronous with the system clock. This daemon is useful for cases where the normal unix cron functionality falls short. There are at least two scenarios where this is the case. First, if you want to execute a task at some time other than the minute boundary. Cron executes its tasks on (or shortly after) the minute boundary. In some instances, the CPU has additional high-priority tasks that it must specifically complete on or near the minute boundary. An example of this situation is when you are running an audio refclock with ntp. The audio refclock undertakes polling of different bands on the minute boundary, and giving the cpu additional workload through cron at these times will impair the ability of the ntp refclock to accurately determine the signal strength for the different bands - a necessary component of its optimization algorithm. Using tcrond to schedule tasks at times other than the minute boundary avoids this problem. Second, the native cron granularity for execution of tasks is one minute. Tcrond will permit the clock-synchronous, periodic execution of tasks with second granularity for the period. For example, it is impossible to execute a task every 16 seconds with cron. It would be possible to use the shell sleep function to accomplish this task, but the execution will gradually walk out of synchronization with the system clock due to the difficulty in matching the sleep time plus the task execution time to the required 16 second period. This is especially true if the task execution time varies. However, with tcrond, tasks may be executed with arbitrary period and the execution time will stay synchronous to the system clock. *COMPILING* tcrond should compile on any recent version of gcc simply using something like: gcc -o tcrond tcrond.c To install, copy it somewhere in your path. For example: sudo cp tcrond /usr/local/bin/tcrond *USAGE* tcrond supports an arbitrary number of jobs given in a configuration file with a fixed line length, determined at compile time (default is 1023 characters). A sample configuration file might look like this: 16 0 /path/to/some/command 300 15 /some/shell/script.sh When reading this configuration file, tcrond would execute two jobs. It would execute the first job every 16th second of the system time (that is, every time EPOCH_TIME%16 == 0). The second job would execute on the 15th second of every 5th minute (that is, 15 seconds after EPOCH_TIME%300 == 0). tcrond also supports two modes of process execution: sequential and parallel. By default, tcrond will spawn a new process for each job. If multiple jobs are scheduled to execute on the same second boundary, it will spawn multiple processes and execute them all in parallel. This may not be desirable for some applications (particularly clock applications, where the CPU seems sensitive to this kind of noise). As a result, tcrond supports a second mode of execution: sequential. In this mode, tcrond will block and wait for one process to finish before starting another. If multiple processes are scheduled to execute in the same second, tcrond will execute them sequentially in the order they appear in the config file. However, if a process hangs (or takes a long amount of time), tcrond will block until that process is complete, causing starvation of the other jobs. To run tcron, issue something like this: $ tcrond /path/to/tcrond.conf To run tcrond in sequential mode, pass it the optional argument --sequential: $ tcrond /path/to/tcrond.conf --sequential *CONTACT/BUGS* Please submit all bug reports to tycho@FOURIERtycho.ws (without the mathematician).