Unexpected Eof Cronjob Error

Why I'm getting unexpected EOF for my cron job?

You may need to escape the % with a \.
% is a special character to the crontab, which gets translated to a newline, so your code was probably becoming

 -p']T
zw51'

Try:

 -p']T\%zw51'

crontab script fail: end of file unexpected (expecting )) when call $(date)

% has special meaning in a crontab (it represents a newline), so you need to escape it to specify a literal percent sign.

 0 5 1 * * goaccess ... > /home/xan/reports/report-week-$(date +\%Y.\%m.\%d).html


Related Topics



Leave a reply



Submit