Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion agents/mk-job
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ cleanup() {
rm "${RUNNING_FILE}" 2>/dev/null
}

echo "start_time $(perl -e 'print time')" >"${TMP_FILE}" 2>/dev/null
try_perl() {
echo "start_time $(perl -e 'print time')" >"${TMP_FILE}" 2>/dev/null
}

fallback_date() {
date +"start_time %s" >"${TMP_FILE}" 2>/dev/null
}
try_perl || fallback_date

cp "${TMP_FILE}" "${RUNNING_FILE}" 2>/dev/null

if [ ! -w "${RUNNING_FILE}" ]; then
Expand Down