LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   cron.daily question (http://www.linuxquestions.org/questions/slackware-14/cron-daily-question-264633/)

ralvy 12-09-2004 06:28 PM

cron.daily question
 
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?

born4linux 12-09-2004 06:42 PM

check the time stamp for /var/lib/slocate/slocate.db. it should be updated daily.
and /var/log/cron should reflect an entry for cron jobs that were ran. you should see something like this for cron.dailyl:

Dec 9 04:02:00 mnlssa CROND[17880]: (root) CMD (run-parts /etc/cron.daily)

rotvogel 12-09-2004 07:05 PM

The timestamp of slocate.db as stated above. On Slackware cron does not log anything. You could email the result of every cronjob by adding your emailadres to the entry in crontab.

alienDog 12-09-2004 09:07 PM

Slackware doesn't include anacron (like some other distributions do), so if you power down your machine for the night, make sure that your cronjobs are set to run when the machine is actually switched on.

ralvy 12-09-2004 10:25 PM

Quote:

Originally posted by alienDog
Slackware doesn't include anacron (like some other distributions do), so if you power down your machine for the night, make sure that your cronjobs are set to run when the machine is actually switched on.
Well, I did some reading on crontab (man crontab) and found the -l switch. As root

Code:

crontab -l
showed a nicely laid out schedule for hourly, daily, weekly, and monthly tasks. As user, no such schedule showed up. After googling on 'crontab howto', I found this page:

Code:

http://www.defcon1.org/html/Software_Articles/Learning-CHMOD/Kernel-Problems/Bootup/crontab.html
which explains the various entries I saw when I did 'crontab -l' as root. An easier explanation than that found when doing a 'man crontab'. After using 'crontab -e' as user, I was able to create the proper cron file for my own account.

I also noted earlier, after looking for various cron files with

Code:

slocate *cron*
that KDE has a kcron I could have used, but after loading that app I quickly noticed that I would never learn a thing about crontab that way, so ditched it early.

Thanks.

Genesee 12-09-2004 10:37 PM

note as well that the crontabs are stored in /var/spool/cron/crontabs

ralvy 12-09-2004 11:55 PM

Quote:

Originally posted by Genesee
note as well that the crontabs are stored in /var/spool/cron/crontabs
Yes. I found that out when loading the file via 'crontab -e'.


All times are GMT -5. The time now is 01:27 AM.