commit - 520459fb323290b92926ebffbdb31ef679f03826
commit + 957fedb0da7ca3872cdb8fedf768138bfc0c8624
blob - 49a4555e2a833925830c42b5539c65e230f6109d
blob + 8186482835599b80b04c09db2db8ccd97ebe49ec
--- vdcron
+++ vdcron
SLEEP=10
TEMP=$(mktemp)
FILE=
-VERSION=0.7
+VERSION=0.6
USAGE="$0 <options>
options are:
-h : this help
echo "Log file: $LOG"
fi
-CURRENT_TIME=$(date +%H%M) # 4 digits
CURRENT_DATE=$(date +%Y%m%d) # 8 digits
CURRENT_DATETIME=$(date +%Y%m%d%H%M) # 12 digits
CURRENT_WDAY=$(date +%A) # x char
line=${line#_}
_flag_noexec=
fi
- if [ "$(expr "$filedate" : '^#.*$')" -gt 0 ]; then
- EXEC="COMMENT"
- REMOVE="NO"
- elif [ "$(expr "$filedate" : '^+[0-9]*')" -gt 0 ]; then
+ if [ "$(expr "$filedate" : '^+[0-9]*')" -gt 0 ]; then
_pastfiledate=${filedate#+}
_firstchar="+"
- if [ "${#_pastfiledate}" -eq 4 -a "$_pastfiledate" -le "$CURRENT_TIME" ]; then
- EXEC="YES"; REMOVE="YES"; _step=60; _datefmt="%H%M"
- elif [ "${#_pastfiledate}" -eq 8 -a "$_pastfiledate" -le "$CURRENT_DATE" ]; then
+ if [ "${#_pastfiledate}" -eq 8 -a "$_pastfiledate" -le "$CURRENT_DATE" ]; then
EXEC="YES"; REMOVE="YES"; _step=86400; _datefmt="%Y%m%d"
elif [ "${#_pastfiledate}" -eq 12 -a "$_pastfiledate" -le "$CURRENT_DATETIME" ]; then
EXEC="YES"; REMOVE="YES"; _step=60; _datefmt="%Y%m%d%H%M"
fi
elif [ "$(expr "$filedate" : '^[0-9]*')" -gt 0 ] ; then
- if [ "$filedate" -eq "$CURRENT_TIME" ]; then
- EXEC="YES"; REMOVE="YES"; _step=60;_datefmt="%H%M"
- elif [ "$filedate" -eq "$CURRENT_DATE" ]; then
+ if [ "$filedate" -eq "$CURRENT_DATE" ]; then
EXEC="YES"; REMOVE="YES"; _step=86400;_datefmt="%Y%m%d"
elif [ "$filedate" -eq "$CURRENT_DATETIME" ]; then
EXEC="YES"; REMOVE="YES"; _step=60;_datefmt="%Y%m%d%H%M"