Jianping Zhu wrote:
I have redhat 7.3 server the /etc/crontab is as following
.................................-------------------------
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.houily
2 4 * * * root run-parts  /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
10 12 * * 1-5 root  /usr/local/pubcrawler/pubcrawler      #line10
10 12 * * * * root  /home/jzhu/pl/p1.pl>/home/jzhu/o1.dat #line11
rewrite this to:
10 12 * * * * /home/jzhu/pl/p1.pl > /home/jzhu/o1.dat

If it's roots crontab, you don't need to designate it here.
If you "must" do it, ad the -u, like:


10 12 * * * * -u root /home/jzhu/pl/p1.pl > /home/jzhu/o1.dat

You also don't need all the junk at the top. It isn't hurting anything, but you don't need it. It will pick up the environment of the user it runs as. So if it runs as "root", it will run under roots default environment.

Cheers.

Ric



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list


Reply via email to