vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm having 2 problems with cron. The first one is that the root cron doesn't seem to be running. I have 3 tasks entered and none of them seem to run. The second is that I'm no longer able to edit my user cron when logged in as the user. What could be causing these? |
| |||
| Hi, > From: downtime null <downtime@do.not.spam.this.address.downtimenull.co m> > I'm having 2 problems with cron. The first one is that the root cron doesn't > seem to be running. I have 3 tasks entered and none of them seem to run. The Take the file that you're calling with crontab, and make sure you have valid CR's at the end of each line.. Look at it with a good editor like vim, for example. Also make sure the items you have listed in the file are executible (chmod a+x filename). Often I messed up the fields when I started using cronjobs, so you might also check that.. this is an example of a cronfile for crontab that works here: 03 0-23 * * * /home/bbbs/mailvlad.sh 07 0-23 * * * /home/bbbs/tonymail.sh 08 0-23/6 * * * /home/bbbs/jdavismail.sh 10 23 * * sun /home/bbbs/mail/forsven.sh The first line is executed every hour at 3 min. past the hour. The third line is executed every 6 hours at 8 min. past the hour. The last line is only executed on Sunday at 10 min. past the hour. > second is that I'm no longer able to edit my user cron when logged in as the > user. > What could be causing these? You have to add the user to wheel group I believe in /etc/group: wheel::10:root,janis,bbs Take care, Janis |
| |||
| On 2004-04-30, Janis Kracht <janis@filegate.net> wrote: > Hi, > >> From: downtime null <downtime@do.not.spam.this.address.downtimenull.co m> > >> I'm having 2 problems with cron. The first one is that the root cron doesn't >> seem to be running. I have 3 tasks entered and none of them seem to run. The > > Take the file that you're calling with crontab, and make sure you have valid > CR's at the end of each line.. Look at it with a good editor like vim, for > example. Also make sure the items you have listed in the file are executible > (chmod a+x filename). Often I messed up the fields when I started using > cronjobs, so you might also check that.. this is an example of a cronfile for > crontab that works here: > > 03 0-23 * * * /home/bbbs/mailvlad.sh > 07 0-23 * * * /home/bbbs/tonymail.sh > 08 0-23/6 * * * /home/bbbs/jdavismail.sh > 10 23 * * sun /home/bbbs/mail/forsven.sh > > The first line is executed every hour at 3 min. past the hour. > The third line is executed every 6 hours at 8 min. past the hour. > The last line is only executed on Sunday at 10 min. past the hour. > here is the root crontab in question : # MIN HOUR DAY MONTH DAYOFWEEK COMMAND 0 0 * * * /usr/bin/ntpdate -b time.nist.gov 0 0 * * * /usr/bin/emerge sync 30 0 * * * /usr/bin/emerge -Upv world | mail -s 'emerge -Uvp world' downtime >> second is that I'm no longer able to edit my user cron when logged in as the >> user. > >> What could be causing these? > > You have to add the user to wheel group I believe in /etc/group: > > wheel::10:root,janis,bbs > my user account is in the wheel group. but i think i may have tried to manually add it when i did it. is there a command i should be using to add a user to group? |
| |||
| So anyway, it was like, 23:52 CEST May 05 2004, you know? Oh, and, yeah, downtime null was all like, "Dude, > On 2004-04-30, Janis Kracht <janis@filegate.net> wrote: >> You have to add the user to wheel group I believe in /etc/group: >> >> wheel::10:root,janis,bbs > > my user account is in the wheel group. but i think i may have tried > to manually add it when i did it. is there a command i should be > using to add a user to group? Nothing to do with that in this case, I think: 'man crontab' -----8<----- If the allow file exists, then you must be listed therein in order to be allowed to use this command. If the allow file does not exist but the deny file does exist, then you must not be listed in the deny file in order to use this command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command. [..] FILES /etc/cron.allow /etc/cron.deny ----->8----- Add your user name (and you might need to add root too, if you create the file) to /etc/cron.allow and you should be able to create your own, personal jes^H^H^Hcrontab. -- Time flies like an arrow, fruit flies like a banana. Perth ---> * 00:57:38 up 23 days, 5:31, 5 users, load average: 0.00, 0.00, 0.00 $ cat /dev/bollocks Registered Linux user #261729 scale cross-media platforms |
| |||
| downtime null wrote: >>> second is that I'm no longer able to edit my user cron when logged in >>> as the user. >> >>> What could be causing these? >> >> You have to add the user to wheel group I believe in /etc/group: >> >> wheel::10:root,janis,bbs >> > > my user account is in the wheel group. but i think i may have tried to > manually add it when i did it. is there a command i should be using to > add a user to group? Your user has to be in the cron group to use crontab. Also check you don't have it blocked in /etc/cron.deny or cron.allow. The usemod command is usermod, read the man for more info. -- marko dot vihoma [ at ] dnainternet dot net |
| ||||
| > my user account is in the wheel group. but i think i may have tried to manually > add it when i did it. is there a command i should be using to add a user to > group? > usermod -G wheel,jkhjkh,hjghj,whateverotherhrpsurein username |