|
-
We did same way,
crontab, we scehdule daily base
2 0 * * * myjob
in the shell script:
myjob code---------------------------------------
wkdate=`date +%w`
DD=`date +%d`
# Mon - Fri, & Sun run daily process
# Saturday run weekly process except:
# the 1st Saturday of each month run monthly process
case $wkdate in
6)
if [[ $DD -lt 8 ]] ; then
echo run monthly process
./month_process.sh
else
echo run weekly process
./weekly_process.sh
fi
;;
*)
echo run daily process
./daily_process.sh
;;
esac
----------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|