Added optional input which will run the command if the delay is in the past.