Re: User crontab file dosent run...?
On 7/17/06, Dan Nelson <[EMAIL PROTECTED]> wrote: In the last episode (Jul 17), perikillo said: > Hi people. > > Im testing how to run scripts from cron using the crontab program, > the handbook say tha each user need to have a crontab file if they > want to run some process with the cron program: > > user-x$ crontab -e > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin > MAILTO=root > */1 * * * * user-x /bin/echo "Testing" User crontabs don't have a "username" column. Remove "user-x" from the above line and it should work. You should still have gotten an error message emailed to root, something like "user-x: not found". Maybe looking at /var/log/cron will help. -- Dan Nelson [EMAIL PROTECTED] Yeaa guys thanks for your help, my job is working now just need to figure out why is not sending the email to the root account...? Thanks :-). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: User crontab file dosent run...?
In the last episode (Jul 17), perikillo said: > Hi people. > > Im testing how to run scripts from cron using the crontab program, > the handbook say tha each user need to have a crontab file if they > want to run some process with the cron program: > > user-x$ crontab -e > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin > MAILTO=root > */1 * * * * user-x /bin/echo "Testing" User crontabs don't have a "username" column. Remove "user-x" from the above line and it should work. You should still have gotten an error message emailed to root, something like "user-x: not found". Maybe looking at /var/log/cron will help. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: User crontab file dosent run...?
On 2006-07-17 10:17, perikillo <[EMAIL PROTECTED]> wrote: > Hi people. > > Im testing how to run scripts from cron using the crontab program, > the handbook say tha each user need to have a crontab file if they > want to run some process with the cron program: > > user-x$ crontab -e > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin > MAILTO=root > */1 * * * * user-x /bin/echo "Testing" The /etc/crontab file is *NOT* the same as the user crontab files. It has an extra field, at column 6, which specifies which user this entry will run as. In user crontabs, the sixth field is the command-name, as below: | $ crontab -l | PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/home/giorgos/bin | | # Email me calendar entries at 00:00 every day | @daily /usr/bin/calendar | | # Save backup copies of my Mercurial repositories in /g/repos | 0,10,20,30,40,50 * * * */home/giorgos/cron.d/repos-gker | | # Save backup copies of my Mercurial repositories in /g/repos | #3,13,23,33,43,53 * * * * /home/giorgos/cron.d/repos-bmi | | # Rotate all log files under `/home/giorgos/log', according to the | # options specified in the `/home/giorgos/log/newsyslog.conf' file. | #8,18,28,38,48,58 * * * * /home/giorgos/cron.d/logrotate | $ So, your user crontab entry tries to run a command called `user-x', which does not exist of course... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
User crontab file dosent run...?
Hi people. Im testing how to run scripts from cron using the crontab program, the handbook say tha each user need to have a crontab file if they want to run some process with the cron program: user-x$ crontab -e SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin MAILTO=root */1 * * * * user-x /bin/echo "Testing" went the user finish and save the file the system say: "/tmp/crontab.JIh2pM4Ey5" 5 lines, 120 characters crontab: installing new crontab Them i use the flag -l to see that user crontab file: root# crontab -l -u user-x SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin MAILTO=root */1 * * * * user-x /bin/echo "Testing" Them the handbook say that the root user must add the user crontab file: root#crontab /var/cron/tabs/user-x_crontab_file But here the crontab add the crontab to user root, ok no problem just what to see this think works, but still dosent see any mail to root, them i run again the command but using the flag -u user-x: root#crontab -u user-x /var/cron/tabs/user-x_crontab_file My cron program is running, i stop and restart the cron daemon but still dont see any answer. I read some mails from this list but my system still dont run my test job. I forget something...? Thanks for your time. Running FreeBSD_5.4-p16. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"