trackrun - Record when the given command was started and ended and expose to it in environment variables



NAME

trackrun - Record when the given command was started and ended and expose to it in environment variables


SYNOPSIS

trackrun [<OPTIONS>] [--] <COMMAND> [<ARGS>]


OPTIONS

-f, --full-command
-b, --command-basename (default)
-n, --name NAME
-e, --env-var ENV


DESCRIPTION

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.


FILES

Store tracking data in ~/.trackrun directory.


ENVIRONMENT

TRACKRUN_LAST_STARTED
TRACKRUN_LAST_ENDED
TRACKRUN_LAST_STATUS


LIMITATIONS

Trackrun does not do locking. You may take care of it if you need using flock(1), cronrun(1), or similar.