# crontab entry with too long line

I want to define this cron resource (command is on 1 line):

cron { 'agents_all':
ensure  => 'present',
command => 'php -q /webserver/webroot/htdocs/web.domain.ch/somedir/projekte/mylandscapes/agents_all_d31827b48ae267f8666538b02185b4e8_agents_all.php > /webserver/scripts/tmp/mylandscapes.log.txt >/dev/null',
hour    => ['23'],
minute  => ['0'],
target  => 'root',
user    => 'root',
}


When applying, puppet tells me, that I have to split the line up with \n . So I added two \n, the first after php -q and the second before the >

Now I can apply this without error, but the resulting crontab entry looks like this:

0 23 * * * php -q \n /webserver/webroot/htdocs/web.domain.ch/somedir/projekte/mylandscapes/agents_all_d31827b48ae267f8666538b02185b4e8_agents_all.php \n > /webserver/scripts/tmp/mylandscapes.log.txt >/dev/null


This crontab entry would not work because of the \n in the command. So, adding \n to long lines in a manifest (as suggested on multiple discussions) seems not to be the correct way. Or did I miss something different?

edit retag close merge delete