app: added support for run once.
api: added support for run commands once.
cmd: implemented run --once.