-
-
Save colby/30d67e136c9a78dd06ac to your computer and use it in GitHub Desktop.
Cron wrapper for logging job duration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG='/tmp/joblog' | |
JOB="$*" | |
NOW=$SECONDS | |
eval $JOB | |
END=$SECONDS | |
echo "$(date) '$JOB' took $(($END - $NOW)) seconds" >> $LOG |
Author
colby
commented
Sep 25, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment