SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just started looking into using cron, which I'm fairly new to linux. I've written a script to sync my time daily but was wondering what others use cron for?
I've just started looking into using cron, which I'm fairly new to linux. I've written a script to sync my time daily but was wondering what others use cron for?
1. remove vim/emacs backup files older than 30 days, once per day
2. get weather data from noaa for conky, twice per day
3. download any Slackware patches that exists twice a month
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309
Rep:
I use cron to run every six minutes the script that among the other things downloads new mail using POP3, checks whether new patches for Slackware appeared, and stores the ChangeLog.txt file locally.
I chmod 000 /etc/cron.daily/slocate to cut down on my disks' wear-and-tear, and run an analogous command by hand perhaps three times per year.
Like you, I add rsetdate to /etc/cron.daily. On my personal server in the colo I also added a script that downloads the Slackware changelog and emails any new entries to myself and some friends: http://ciar.org/ttk/public/slacklog.pl
Thanks for your replies. @w1k0, I like the idea of checking for patches and maybe mailing them to root. Other ideas I had was to periodically run programs like aide and rkhunter, or would that be better done from a live distro?
Another thing I was thinking about was retrieving gmail, does anyone do this?
I don't make much use of cron as I'm more of a ad-hoc kind of guy. Maybe if I left my system up 24x7 then I'd do things differently, but my box sleeps when I sleep.
Quote:
Originally Posted by ttk
I chmod 000 /etc/cron.daily/slocate to cut down on my disks' wear-and-tear, and run an analogous command by hand perhaps three times per year.
I think you're proably right to disable it. slocate/updatedb may make sense on a server with millions of files, but for a modern desktop/workstation that has more than enough ram to keep inodes/dirents in vfs_cache I'm not convinced a database based solution like slocate makes any sense..
I have this in my .bashrc, which I use instead and will pretty much do the same job as an "slocate -i" does without the need to run updatedb.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.