Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
We use cron tabs at work to schedule various scripts, but what would I use this for at home? I know I can use it to schedule a backup or that sort of thing.
But what I'm curious about is what everyone uses cron tabs for. What do you schedule on your home computer?
This is just a curiosity type of thing. I'm also wondering if I'm missing something. Could I be making better use of my system?
I use it to sync my portage tree. Logroller uses it for me. I also plan on using it to run "updatedb" on a regular basis, but I haven't got to it yet. There are a lot of other things you can do with it I have no need for as of right now. On the same hand though there a lot of things I can do with it I just don't right now.
Some of the processes in my crontab (most run nightly):
Download new patches from Slackware mirror
Download various podcasts
Download new virus definition files
Run virus scanner
The above processes also send an email if any action was taken (file downloaded, virus found, etc.) or any errors occurred.
Currently, I have cron jobs set up to update the locate database and do log rotation (these were already set up in Slack, I just had to change the settings so they'd run at a more convenient time). I'll set one up for removing temp files, too.
I found a wiki article on removing the temp files using cron on the Gentoo Wiki. How safe is that? Is there something I need to watch out for when removing temp files?
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447
Rep:
I have my crontab set up to run Archstats (a stat reporting program for Arch Linux), download and install the latest packages for Arch, and as an alarm to wake me up most mornings.
I wrote a little script which copies the /root/.bash_history file to a backup location and append the date to the filename. I also insert date into the .bash_history file so I know what day commands were run. This comes in handy at times.
I run the script once a day via cron.
I also use cron to run a script to check for disk space availability. (df -h) And it emails me if the output of the df is over 75%.
I also insert date into the .bash_history file so I know what day commands were run. This comes in handy at times.
Hmm, you might want to check out the HISTTIMEFORMAT environment variable. I use zsh myself so I don't know if that's what you're looking for. From bash man page:
Quote:
If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
I'm currently using crontab to record TV (dvb) because I can't be arsed to install MythTV/etc, I just wrote a couple of wrapper scripts around mencoder.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.