Scroll to navigation

timer(8gx) Gromox admin reference timer(8gx)

Name

timer — deferred command executor

Synopsis

timer [-c config]

Description

The timer daemon can be used to schedule commands to be executed once, at a particular time in the future. It is similar to the at(1) command and its associated daemon, atd.

timer(8gx) generally receives commands from timer_agent(4gx).

Options

Read configuration directives from the given file. If this option is not specified, /etc/gromox/timer.cfg will be read if it exists.
Output version information and exit.
-?
Display option summary.

All time-based command-line options and configuration file directives are subject to the syntax described in gromox(7), section "Duration specifications".

Files

/var/lib/gromox/timer.txt: This file is used to save the state of timer(8gx) and persist them across restarts.

Configuration directives

The usual config file location is /etc/gromox/timer.cfg.

Colon-separated list of directories which will be scanned when locating further configuration files, especially those used by plugin instances.
Default: /etc/gromox/timer:/etc/gromox
An unprivileged user account to switch the process to after startup. To inhibit the switch, assign the empty value.
Default: gromox
A space-separated list of individual IPv6 or v4-mapped IPv6 host addresses that are allowed to converse with the timer service. No networks and no CIDR notations are permitted. This option deprecates the /etc/gromox/timer_acl.txt file used in earlier versions.
Default: ::1
An IPv6 address (or v4-mapped address) for exposing the timer service on.
Default: ::1
The TCP port number for exposing the timer service on.
Default: 6666
Target for log messages here. Special values: "-" (stderr/syslog depending on parent PID) or "syslog" are recognized.
Default: - (auto)
Maximum verbosity of logging. 1=crit, 2=error, 3=warn, 4=notice, 5=info, 6=debug.
Default: 4 (notice)
Default: /var/lib/gromox/timer.txt
The minimum number of client processing threads to keep around.
Default: 50

Timer protocol

The timer service is exposed as a line-based text protocol. Upon connection, the event server gratitiously writes "OK", following which the server will wait for timer commands, and execute them synchronously.

The command "ADD <seconds> <command>" installs a new timer for the given command to be executed in that many seconds from now. The server will respond with "FALSE 2", "FALSE 3", or respond with the timer ID as "TRUE <id>".

The command "CANCEL <id>" revokes the timer with the chosen ID.

See also

gromox(7), timer_agent(4gx)

Gromox