Re: Problems running SH jobs using CRON
On Tue, 2008-08-12 at 19:04 -0400, jeff goudie wrote: Hi there, I have two SH jobs I've always run manually in the past and would like to have them run once a week automatically using cron.. I looked on the internet for examples of running SH jobs and used crontab -e to create this: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh The argument root should not appear in a crontab entry, See man 5 crontab When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found This endeavor seemed pretty straight forward and after adding /bin to my path and still getting the above message, I'm kinda stumped now. Any suggestions or any more info I can offer? Thanks! -- === I'm really enjoying not talking to you ... Let's not talk again REAL soon ... === Aaron Konstam telephone: (210) 656-0355 e-mail: [EMAIL PROTECTED] -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: Problems running SH jobs using CRON
On Tue, 12 Aug 2008 19:04:00 -0400, jeff goudie wrote: Hi there, I have two SH jobs I've always run manually in the past and would like to have them run once a week automatically using cron.. I looked on the internet for examples of running SH jobs and used crontab -e to create this: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found This endeavor seemed pretty straight forward and after adding /bin to my path and still getting the above message, I'm kinda stumped now. Any suggestions or any more info I can offer? Thanks! Reread the crontab manual page. User's crontabs have only six (!) fields, not seven. Only the global /etc/crontab has seven fields. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: Problems running SH jobs using CRON
Michael Schwendt wrote: On Tue, 12 Aug 2008 19:04:00 -0400, jeff goudie wrote: Hi there, I have two SH jobs I've always run manually in the past and would like to have them run once a week automatically using cron.. I looked on the internet for examples of running SH jobs and used crontab -e to create this: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found This endeavor seemed pretty straight forward and after adding /bin to my path and still getting the above message, I'm kinda stumped now. Any suggestions or any more info I can offer? Thanks! Reread the crontab manual page. User's crontabs have only six (!) fields, not seven. Only the global /etc/crontab has seven fields. Also, if you want them run only one a week, you might just put a script to run them in /etc/cron.weekly unless you need better control over when they run. -- Kevin J. Cummings [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Registered Linux User #1232 (http://counter.li.org) -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: Problems running SH jobs using CRON
On Tue, Aug 12, 2008 at 1:04 PM, jeff goudie [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found Remove the word 'root' from both lines? I'm not positive, but if the two scripts have the proper #!/bin/sh line in them, putting /bin/sh in the crontab line should also be unnecessary. Dave -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: Problems running SH jobs using CRON
On Tue, Aug 12, 2008 at 4:13 PM, Dave Burns [EMAIL PROTECTED] wrote: On Tue, Aug 12, 2008 at 1:04 PM, jeff goudie [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found Remove the word 'root' from both lines? I'm not positive, but if the two scripts have the proper #!/bin/sh line in them, putting /bin/sh in the crontab line should also be unnecessary. Dave That's correct. The lines should work like this: 45 12 * * 0 /home/jeff/jeffbkup.sh 11 3 * * 6 /home/jeff/rsynchbkup.sh ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Re: Problems running SH jobs using CRON
Thanks for everbody's help! Both jobs ran after removing root as suggested. Thanks agan! On Tue, Aug 12, 2008 at 7:57 PM, Aldo Foot [EMAIL PROTECTED] wrote: On Tue, Aug 12, 2008 at 4:13 PM, Dave Burns [EMAIL PROTECTED] wrote: On Tue, Aug 12, 2008 at 1:04 PM, jeff goudie [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] jeff]# cat /var/spool/cron/root 45 12 * * 0 root /bin/sh /home/jeff/jeffbkup.sh 11 3 * * 6 root /home/jeff/rsynchbkup.sh When each scheduled job fires off, I get an email from Cron_Daemon with this message: /bin/sh: root: command not found Remove the word 'root' from both lines? I'm not positive, but if the two scripts have the proper #!/bin/sh line in them, putting /bin/sh in the crontab line should also be unnecessary. Dave That's correct. The lines should work like this: 45 12 * * 0 /home/jeff/jeffbkup.sh 11 3 * * 6 /home/jeff/rsynchbkup.sh ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list