kassube at gmx.net
Thu Mar 27 18:49:08 UTC 2008
Mario Frechette wrote:
> I am trying to get a date in my log file name for a script that runs
> daily in cron and i can see in syslog
> that the sript runs but no date on the log file
> this is how it looks in crontab
> 43 12 * * 1-5 /bin sh rsync.sh >/home/eric/backup.log.`date
> should I put some commands in the script itself ?
It seems you can't use the "`" syntax because a crontab is not a script.
If you had installed the mail command, you would have received a mail
with the problem every time cron failed to execute your command.
Therefore, the log should be generated by your script. Another option
would be to install the mail command (e.g. package mailx). Then you would
receive the output of the script as a mail.
More information about the ubuntu-users