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

-c config
    Read configuration directives from the given file. If this option is not specified, /etc/gromox/gromox.cfg and /etc/gromox/timer.cfg will be read.

--version
    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.

running_identity
    An unprivileged user account to switch the process to after startup. To inhibit the switch, assign the empty value.
    Default: gromox

timer_hosts_allow
    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.
    Default: ::1

timer_listen_ip
    An IPv6 address (or v4-mapped address) for exposing the timer service on.
    Default: ::1

timer_listen_port
    The TCP port number for exposing the timer service on.
    Default: 6666

timer_log_file
    Target for log messages here. Special values: "-" (stderr/syslog depending on parent PID) or "syslog" are recognized.
    Default: - (auto)

timer_log_level
    Maximum verbosity of logging. 1=crit, 2=error, 3=warn, 4=notice, 5=info, 6=debug.
    Default: 4 (notice)

timer_state_path
    Default: /var/lib/gromox/timer.txt

timer_threads_num
    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)