有时候会测试定时任务看执行情况,需要输出当前执行时间。如果不熟悉,时间格式容易搞错,输出错误会是crontab-uapache-e*****echo"11_$(date'+\%Y_\%m_\%d\%H:\%M:\%S')">>/data/www/xxxx/storage/logs/cron.txt效果

有时候会测试定时任务看执行情况,需要输出当前执行时间。如果不熟悉,时间格式容易搞错,输出错误会是crontab-uapache-e*****echo"11_$(date'+\%Y_\%m_\%d\%H:\%M:\%S')">>/data/www/xxxx/storage/logs/cron.txt效果