Linux crontab 在每月最后一天执行

59  23 * * * if [ `date +%d -d tomorrow` = 01 ]; then; command(/usr/bin/curl -s -o temp.txt  http://o2o.szmall.com/api/Sys/imoprt_money.html)     (解释:就是相当于如果明天是1号,那肯定今天是月末啊 然后执行命令)

或者写成

 

 

打印明天日期

打印昨天日期

 

posted @ 2018-12-11 10:08  龙卷风之殇  阅读(8088)  评论(0编辑  收藏  举报