This is a discussion on cron.daily question within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I have, by default, an slocate script in cron.daily, however I see no evidence that that script ever runs. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have, by default, an slocate script in cron.daily, however I see no evidence that that script ever runs. Is there something I need to do to make Slack run that script daily, other than have it in that directory and make sure it's executable? |
| |||
| Ralph Alvy <ralvy@warpmail.net> writes: > I have, by default, an slocate script in cron.daily, however I see no > evidence that that script ever runs. Is there something I need to do to > make Slack run that script daily, other than have it in that directory and > make sure it's executable? take a look at root's crontab (do 'crontab -l' as root). then you'll see what happens when you put a script in cron.daily. -- Joost Kremers Life has its moments |
| |||
| Ralph Alvy wrote: > I have, by default, an slocate script in cron.daily, however I see no > evidence that that script ever runs. Is there something I need to do > to make Slack run that script daily, other than have it in that > directory and make sure it's executable? By default, if your computer isn't on at 4:40am, it isn't running. Check the db timestamp in /var/lib/slocate. You can run it yourself; as root /etc/cron.daily/slocate -- Robert - slackware |
| |||
| Ralph Alvy wrote: > I have, by default, an slocate script in cron.daily, however I see no > evidence that that script ever runs. Is there something I need to do to > make Slack run that script daily, other than have it in that directory and > make sure it's executable? > > > You could also have something mailed to you confirming that it ran upon completion of updatedb. Andrew -- Andrew Balmos (abalmos) If you need to email me, email a _ bal mos gma il c o m (remove all spaces, _, and place the '.' in the correct spots) Thanks. |
| |||
| Joost Kremers wrote: > Ralph Alvy <ralvy@warpmail.net> writes: > >> I have, by default, an slocate script in cron.daily, however I see no >> evidence that that script ever runs. Is there something I need to do to >> make Slack run that script daily, other than have it in that directory >> and make sure it's executable? > > take a look at root's crontab (do 'crontab -l' as root). then you'll see > what happens when you put a script in cron.daily. > Thanks to all. After reading up on crontab with man, I did crontab -l as root and found how to form the file I needed. I then did crontab -l as user and, as expected, found no listings at all. So I did crontab -e as user and created a similar file, but made sure the values I used caused operations during midday. My computer is off when I retire for the night. I got a nice explanation of the meanings of the different values in that file here: http://tinyurl.com/5hysr |
| |||
| On 2004-12-10, Ralph Alvy <ralvy@warpmail.net> wrote: > >> Ralph Alvy <ralvy@warpmail.net> writes: >> >>> I have, by default, an slocate script in cron.daily, however I see no >>> evidence that that script ever runs. Is there something I need to do to >>> make Slack run that script daily, other than have it in that directory >>> and make sure it's executable? >> > Thanks to all. After reading up on crontab with man, I did > > crontab -l > > as root and found how to form the file I needed. I then did > > crontab -l > > as user and, as expected, found no listings at all. So I did > > crontab -e > > as user and created a similar file, but made sure the values I used caused > operations during midday. If you're really trying to rebuild the slocate database, you're not going to be able to do it as user. There's nothing preventing you from adding a separate entry to root's crontab, or from changing the time at which the cron.daily scripts run. Of course, if you're running your own job, then it's not a problem. > I got a nice explanation of the meanings of the different values in that file > here: http://tinyurl.com/5hysr You do realize that a) a full description is in the manpage for crontab, and b) the above URL describes FreeBSD's crontab? In this case it appears you're okay, but you need to strive to use the docs on your system before using docs not necessarily applicable to your system. If, for example, you'd stumbled upon Vixie cron documentation, you'd be very confused when something documented there didn't work in Slackware (which uses Dillon cron). --keith -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom |
| |||
| Keith Keller wrote: > On 2004-12-10, Ralph Alvy <ralvy@warpmail.net> wrote: > If you're really trying to rebuild the slocate database, you're not > going to be able to do it as user. There's nothing preventing you from > adding a separate entry to root's crontab, or from changing the time at > which the cron.daily scripts run. Oops. I forgot that I can only run updatedb as root. Will the root crontab run even when not logged in as root? Perhaps a silly question. >> I got a nice explanation of the meanings of the different values in that >> file here: http://tinyurl.com/5hysr > > You do realize that a) a full description is in the manpage for crontab, > and b) the above URL describes FreeBSD's crontab? Didn't realize it was about a different crontab. That said, the URL I cited had a section in it that helped me much more than the man page: Field Meaning 1 Minutes after the hour (0-59) 2 Hour, in 24 hour format (0-23) 3 Day of the month (1-31) 4 Month (1-12) 5 Day of the week (0-6, 0 = Sunday) I know I could have gleaned this with enought time spent on the man page for crontab, but that URL was much clearer to me. I also tried 'info crontab' on my system. Thanks, Keith. |
| |||
| Keith Keller wrote: > Oops. I forgot that I can only run updatedb as root. Will the root crontab > run even when not logged in as root? Perhaps a silly question. Not a silly question and yes, root's crontab will always run (even when not logged in as root). Wim |
| |||
| On 2004-12-10, Robert <redneck@lowtech.net> wrote: > Ralph Alvy wrote: > >> I have, by default, an slocate script in cron.daily, however I see no >> evidence that that script ever runs. Is there something I need to do >> to make Slack run that script daily, other than have it in that >> directory and make sure it's executable? > > By default, if your computer isn't on at 4:40am, it isn't running. Check > the db timestamp in /var/lib/slocate. > > You can run it yourself; as root > /etc/cron.daily/slocate > It's just one command, actually. "updatedb". The "-c" option isn't a parameter to updatedb per se, but is to slocate, which is what it's linked to. 'man updatedb' You could also use fcron. http://fcron.free.fr/ fcron can base the decision to run something on the time that the system is actually on, so downtime doesn't affect it. Also has detailed logging and mails a report that the job completed. The fcrontab equal to the default crontab that comes standard I posted in the post titled 'Updates'. -- --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ |
| ||||
| jayjwa wrote: > You could also use fcron. http://fcron.free.fr/ > > fcron can base the decision to run something on the time that the system > is actually on, so downtime doesn't affect it. Also has detailed logging > and mails a report that the job completed. The fcrontab equal to the > default crontab that comes standard I posted in the post titled 'Updates'. > > Nice. Just downloaded, compiled and installed it. This really fits the bill, since I turn my computer off nightly. Thanks. |