crontab could be better …

I always had problems with crontab.

Long ago, I used to believed that it was stored somewhere in /etc/ and expected to get it back after a system restore … Well I learned that it lives in /var/spool/cron ! I was young (and it was at home.)

But recently, something more tricky happened : I tried to use file_name`date “+%Y%m%d”`.txt Seems OK? but it isn’t !

cron interpreted % as a special meaning : new line ! You have to escape it \% ! Like this file_name$(date +\%Y\%m\%d).txt !

Would it be difficult to issue a warning in case of % after editing the cron ??

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: