LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2011, 06:16 AM   #1
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 67
Questions not worth their own thread


I thought it would be nice to have a thread where we can ask questions that may be very simple for more experienced users to answer but that make us new users very curious. I hope you guys like the idea as well, especially because I have a lot of silly questions.

I'll start.

I've been trying to ressurect an old computer I have and it was suggested here and here to edit some of the init scripts. So far so good. I just don't get very well how cron jobs work. If I simply add the commented out items to a script, make it executable and place it in /etc/cron.daily, will it be automatically run?
 
Old 03-14-2011, 07:01 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
This is not a good idea, since it will be hard, if not impossible to include the questions
and answers in the search functions of LQ.
So a lot of knowledge will be lost.
You need to subscribe to the thread, in order to see the new questions and answers.
Every question is worth his own thread.

Just my 2 cents


Kind regards

Last edited by repo; 03-14-2011 at 07:03 AM.
 
1 members found this post helpful.
Old 03-14-2011, 07:04 AM   #3
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware and Debian
Posts: 553

Rep: Reputation: 134Reputation: 134
I recommend using:

# crontab -e

to adjust cronjobs

read:

# man crontab

You may find a lot of examples and it is not too complicated.
 
Old 03-14-2011, 07:06 AM   #4
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware and Debian
Posts: 553

Rep: Reputation: 134Reputation: 134
Everybody should feel free to ask any question here in any format they like. This is the official Slackware help line and we should cater for everyone who wishes to try Slackware.
 
Old 03-14-2011, 07:27 AM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
I must agree with the previous posters - having a "general" thread makes searching stuff impossible and no one should feel in any way embarrased about starting a thread.
Quote:
I've been trying to ressurect an old computer I have and it was suggested here and here to edit some of the init scripts. So far so good. I just don't get very well how cron jobs work. If I simply add the commented out items to a script, make it executable and place it in /etc/cron.daily, will it be automatically run?
Yes - have a look in /var/spool/crontabs (error here - see post #7) where you will see any user's crontabs and one for root. The root crontab runs /usr/bin/run-parts to run stuff in /etc/cron.{hourly,daily,weekly,monthly} at the predefined times. Just create an executable bash script in the respective /etc/cron.{hourly,daily,weekly,monthly} directory and it will be ran at the predefined time. Alternatively you can set up a users crontab with crontab -e - look at man crontab for examples however system stuff is maybe best put in one of the /etc/cron directories as a script as it keeps such system tasks easily manageable. Then again - using crontab -e gives more control over timings,reporting,orders and dependencies of related jobs. The standard system has the scripts certwatch,logrotate and slocate ran daily.

Last edited by bgeddy; 03-14-2011 at 08:33 AM.
 
Old 03-14-2011, 07:31 AM   #6
hitest
Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware
Posts: 5,860

Rep: Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031
I agree with repo. As new issues arise people should have the freedom to ask for help with their own separate questions.
 
Old 03-14-2011, 08:00 AM   #7
neymac
Member
 
Registered: May 2009
Distribution: Slackware64-14.1
Posts: 138

Rep: Reputation: 19
Quote:
Originally Posted by bgeddy View Post
Yes - have a look in /var/spool/crontabs where you will see any user's crontabs and one for root.
There is a mistype. The path is:
/var/spool/cron/crontabs

Last edited by neymac; 03-14-2011 at 08:02 AM.
 
Old 03-14-2011, 08:32 AM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
There is a mistype. The path is:
/var/spool/cron/crontabs
Oops - thanks for pointing that out! My fingers aren't working to well ATM! Apologies if I misled anyone.
 
Old 03-14-2011, 09:46 AM   #9
dh2k
Member
 
Registered: Jan 2006
Distribution: Slackware 13.0 (KDE 3.5.10 from 12.2; Xfce 4.6; Fluxbox); Slackware 13.1 (KDE 4.5)
Posts: 211

Rep: Reputation: 52
"There are no stupid questions;
only stupid answers"
anonymous
 
Old 03-14-2011, 09:53 AM   #10
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, Portugal
Distribution: Slackware
Posts: 429

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by bonixavier View Post
I thought it would be nice to have a thread where we can ask questions that may be very simple for more experienced users to answer but that make us new users very curious. I hope you guys like the idea as well, especially because I have a lot of silly questions.
First, there are no silly questions
There are, however, poorly phrased questions that either annoy or confuse potential helpers.
ie: "I have some trouble understanding cron jobs, can you guys help me?" is a valid question, and although it may be trivial for a more advanced user who will probably answer it quickly, you will get an answer (or several)...
...but if you say "OMG! CRON DONT WORK! FIX IT NOW!!!" it will probably annoy the crap out of most people and they'll either ignore you or comment on the way you 'asked' rather than on the question itself.

That being said, I'd rather see each question in its own thread.
It is much easier to notice a thread with an intelligently chosen title than browsing through a single thread with hundreds of questions.

Quote:
Originally Posted by bonixavier View Post
I just don't get very well how cron jobs work. If I simply add the commented out items to a script, make it executable and place it in /etc/cron.daily, will it be automatically run?
Basically, yes
If you 'cat /var/spool/cron/crontabs/root' you will notice that scripts inside "cron.daily" will be executed every day at 4:40
You can also edit the file so you have other useful folders that 'auto-magically' run any script you put inside, or you can also run individual scripts at a predetermined time of your choosing.
ie: i have "cron.05mins" and "cron.10mins" folders which, as you might have guessed, run scripts every 5 and 10 minutes respectably.

Read 'man crontab'
 
Old 03-14-2011, 12:32 PM   #11
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Original Poster
Rep: Reputation: 67
I think you guys are right. Searching a thread like this one if it got big would be a nightmare. I hadn't thought of that. I'll mark it as solved.

Regarding the cron jobs, I'll take some time to read man crontab. Thank you all for the replies. I'm just taking a lunch break now so I won't have time to reply properly to the posts. When I get home later, I'll do that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fdisk questions (split off from hi-jacked thread) Carsto Linux - Newbie 15 02-17-2010 03:54 PM
The answers without questions thread.... cyent Linux - Software 5 12-23-2008 05:24 PM
The touchpad "tapping" questions answers and solutions mega-thread tommytomthms5 Linux - Laptop and Netbook 4 10-30-2007 06:01 PM
10.1 worth upgrading? WLAN PCMCIA questions... lostchild Mandriva 3 09-19-2004 12:18 AM
Linux Thread Questions and Problems esi-eric Linux - Software 1 07-28-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration