trackrun - Record when the given command was started and ended and expose to it in environment variables |
trackrun - Record when the given command was started and ended and expose to it in environment variables
trackrun [<OPTIONS>] [--] <COMMAND> [<ARGS>]
It records when it starts COMMAND and when it ends, identifying COMMAND either by one of 4 options: (1) Full command line including ARGS. (2) Only the command name, COMMAND. (3) By the name given by the user in NAME. (4) By the environment variable given by name ENV.
Set TRACKRUN_LAST_STARTED and TRACKRUN_LAST_ENDED environments for COMMAND to the ISO 8601 representation of the date and time when COMMAND was last started and ended respectively. Set TRACKRUN_LAST_STATUS to the status COMMAND last exited with. Those are left empty if no data yet.
Store tracking data in ~/.trackrun directory.
Trackrun does not do locking. You may take care of it if you need using flock(1)
, cronrun(1)
, or similar.