-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcron.sh
More file actions
executable file
·15 lines (11 loc) · 589 Bytes
/
cron.sh
File metadata and controls
executable file
·15 lines (11 loc) · 589 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# WARNING: Changing this file will affect cron immediately
fullpath=$(dirname $(realpath $0))
(
echo "=================================== $(date) ==================================="
$fullpath/autoconnector.sh | sed -E 's/\xd$//g' # sed: replace the last "^M" with "\n"
echo "===================================================================================================="
echo
) >> $fullpath/log/`date '+%Y-%m-%d'`.log 2>&1
# create symlink of the latest log file as file name "latest.log"
ln -sf $fullpath/log/`date '+%Y-%m-%d'`.log $fullpath/log/latest.log