http://blog.csdn.net/fdipzone/article/details/51778543
0 12 * * * php /Users/fdipzone/test.php >> /Users/fdipzone/test.log 2>&1
0 12 * * * php /Users/fdipzone/test.php >> "/Users/fdipzone/$(date +"\%Y-\%m-\%d").log" 2>&1
使用月份命名
使用小时命名
0 12 * * * php /Users/fdipzone/test.php >> "/Users/fdipzone/$(date +"\%Y-\%m").log" 2>&1
0 12 * * * php /Users/fdipzone/test.php >> "/Users/fdipzone/$(date +"\%Y-W\%W").log" 2>&1
* * * * * php /Users/fdipzone/test.php >> "/Users/fdipzone/$(date +"\%Y-\%m-\%d_\%H").log" 2>&1
转自:lamp兄弟连
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:linux中crontab文件 出自老鄢博客 | 欢迎分享