timer

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/timer.cfg will be read if it exists.

–version

Output version information and exit.

-?

Display option summary.

Files

  • config_file_path/timer_acl.txt: A file with one address (IPv6 or v4-mapped) per line of allowed clients. In its absence, ::1 is default-whitelisted.

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

Configuration file directives

config_file_path
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
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_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)