Unix Technical Forum

cron.daily question

This is a discussion on cron.daily question within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Ralph Alvy wrote: > Joost Kremers wrote: > > >>Ralph Alvy <ralvy@warpmail.net> writes: >> >> >>>I have, by default, ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-19-2008, 06:13 PM
Giovanni
 
Posts: n/a
Default Re: cron.daily question

Ralph Alvy wrote:
> 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


Since most of the jobs in the cron.daily directory are run on night
hours and my box too is off I put in rc.local as last command:

batch <<DONE
/usr/bin/run-parts /etc/cron.daily
DONE

This forces the execution of all daily activities that cron schedules
during the night.

Ciao
Giovanni

--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 <http://counter.li.org/>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-19-2008, 06:13 PM
Faux_Pseudo
 
Posts: n/a
Default Re: cron.daily question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

_.-In alt.os.linux.slackware, Wim wrote the following -._
> 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).


Lets make that clearer. Every users crontab will run even when that
user is not logged in.

crontab is there to run apps that 1) need to be run at regular
intervuls. 2) need to be run when the user is not logged in.

In an ideal world you should never be logged in as root so if cron
jobs didn't run if you weren't logged in then roots jobs would never
be run.

- --
.-')) asciipr0n.com/fp ('-. | It's a damn poor mind that
' ..- .:" ) ( ":. -.. ' | can only think of one way to
((,,_;'.;' UIN=66618055 ';. ';_,,)) | spell a word.
((_.YIM=Faux_Pseudo :._)) | - Andrew Jackson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBulaeSJec2PH9pbURAkh2AJsEgmu5k90cCpZGwgmUTX VOfYmmvACdGLDp
mwCg0DBnJrO1IK8CodqGyhU=
=KaBN
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-19-2008, 06:13 PM
Ralph Alvy
 
Posts: n/a
Default Re: cron.daily question

Faux_Pseudo wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> _.-In alt.os.linux.slackware, Wim wrote the following -._
>> 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).

>
> Lets make that clearer. Every users crontab will run even when that
> user is not logged in.
>
> crontab is there to run apps that 1) need to be run at regular
> intervuls. 2) need to be run when the user is not logged in.
>
> In an ideal world you should never be logged in as root so if cron
> jobs didn't run if you weren't logged in then roots jobs would never
> be run.


Yep. Very clear. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-19-2008, 06:13 PM
Wim
 
Posts: n/a
Default Re: cron.daily question

Faux_Pseudo wrote:
> (...) Every users crontab will run even when that user is not logged
> in. (...)


Didn't know that. Thanks for the clarification.

Wim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com