RE: crontab entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Sounds like cron isn't running as root.  So it is able to write a file
> without hard coding a path to it because it is creating the file in it's
> working directory.  Create a directory that the user cron is running as
> can write to.  That sounds like what the problem is.
>
> Wade

Actually, Justin Banks already gave me the correct answer in an earlier
post...

Cron treats the first % as a newline, so it never sees the end quote.
You need to escape all the %.

-justinb


My new cron entry looks like this now and works okay...

7 */2 * * * $rsync > /root/rsync_`/bin/date +\%m\%d_\%I\%M\%p` 2>&1



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux