From 0de1f0dab45016db5ee77e449cb150342b789b13 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Tue, 26 Sep 2023 14:49:39 +0200 Subject: [PATCH] show exit time in shell script --- cronjobs.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cronjobs.sh b/cronjobs.sh index 477034e..1cb6e63 100644 --- a/cronjobs.sh +++ b/cronjobs.sh @@ -12,4 +12,10 @@ cd domains cd zefix.silias.ch cd public_html /usr/bin/php taskExecuter.php -echo "Script is Ending $0" \ No newline at end of file +echo "Script is Ending $0" + +# Get the current date and time in a specific format +formatted_time=$(date +"%Y-%m-%d %H:%M:%S") + +# Echo the formatted time +echo "Current time: $formatted_time" \ No newline at end of file