Author Topic: OS X Maintenance  (Read 18649 times)

Offline kps

  • TS Addict
  • *****
  • Posts: 1693
    • View Profile
    • http://
OS X Maintenance
« Reply #15 on: September 13, 2003, 10:19:34 PM »
Mrious_be, drag and drop the /etc/crontab file onto TextEdit and you can see when the scripts are to be run... (TextEdit can not run as root any longer, so don't worry about doing anything to your system by opening it).

I talked about it here many month ago... THREAD. Scroll near the bottom.

Since I changed mine, I don't remember the times exactly, but I believe they are:

Daily::::::4:15 AM each day
Weekly:::4:30 AM each Saturday
Monthly::5:30 AM on the 1st Day of each month
« Last Edit: September 13, 2003, 10:23:38 PM by kps »

Offline Gary S

  • TS Addict
  • *****
  • Posts: 2503
    • View Profile
OS X Maintenance
« Reply #16 on: September 13, 2003, 10:38:57 PM »
I just use MacJanitor to run the cron scripts, Disk Utility and DiskWarrior 3 about once a month.
Gary S

Offline ljocampo

  • Super Poster
  • ***
  • Posts: 272
    • View Profile
OS X Maintenance
« Reply #17 on: September 13, 2003, 10:42:37 PM »
KPS:   You have have told Mrious that the crontab file in NOT a visible file.  She is not going to find it unless she search for invisible files.   Thinking.gif

Offline ljocampo

  • Super Poster
  • ***
  • Posts: 272
    • View Profile
OS X Maintenance
« Reply #18 on: September 13, 2003, 10:43:54 PM »
have have = should have    oops.gif

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #19 on: September 14, 2003, 04:43:41 AM »
QUOTE(kps @ Sep 14 2003, 5:19 AM)
Mrious_be, drag and drop the /etc/crontab file onto TextEdit and you can see when the scripts are to be run...

Daily::::::4:15 AM each day
Weekly:::4:30 AM each Saturday
Monthly::5:30 AM on the 1st Day of each month

 Woooow KPS, that's very interesting.
I would like to change mine to, cause it's what i thought.... it's to early for since i get up every weekday at 5am, but not in the weekdays.
So with a little luck only the monthly are working sometimes.
Than again, it might be easier if i just use MacJanitor again (i downloaded it already).

I do check that out though smile.gif

Thx, really interesting.
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline kps

  • TS Addict
  • *****
  • Posts: 1693
    • View Profile
    • http://
OS X Maintenance
« Reply #20 on: September 14, 2003, 08:36:07 AM »
Ijocampo, the crontab file is not invisible, the /etc directory is... wink.gif

I think Marcel knows this. The simplest way to get there is using the GO menu in the Finder. Go To Folder :: /etc and you're there.

Find crontab and Drag and Drop it onto TextEdit to see it. You wont be able to make any changes because it's owned by the System, but it gives you a chance to see how it works.

To change the crontab file, you must be root and consequently root must be enabled...however sudo should work even without root being enabled (I'm not sure of this as I have root enabled).

Marcel, the absolute easiest way to change the times in crontab is to use the Terminal Tool in BBEdit 6.5 or higher. Just navigate to /etc/crontab, edit and save. BBEdit will authenticate you as root and you're done...wonderful.

The other way is to use a CLI editor such as Pico, vi or emacs. But I dont think you're into it. wink.gif  If you are, let me know and I'll give you the instructions.
« Last Edit: September 14, 2003, 08:37:06 AM by kps »

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #21 on: September 14, 2003, 09:21:17 AM »
QUOTE(ljocampo @ Sep 14 2003, 5:42 AM)
KPS:   You have have told Mrious that the crontab file in NOT a visible file.  She is not going to find it unless she search for invisible files.   Thinking.gif

 "She"? biggrin.gif
It could be a "He" wink.gif

yup yup B)
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #22 on: September 14, 2003, 09:29:06 AM »
QUOTE(kps @ Sep 14 2003, 3:36 PM)
I think Marcel knows this. The simplest way to get there is using the GO menu in the Finder. Go To Folder :: /etc and you're there.

Marcel, the absolute easiest way to change the times in crontab is to use the Terminal Tool in BBEdit 6.5 or higher. Just navigate to /etc/crontab, edit and save. BBEdit will authenticate you as root and you're done...wonderful.

The other way is to use a CLI editor such as Pico, vi or emacs. But I dont think you're into it. wink.gif  If you are, let me know and I'll give you the instructions.

 Well kps, this is kinda nice feeling but i think you have a to big credit when you think of me wink.gif
I wouldn't even know how to begin using the terminal, and i didn't know it was an invisible file blush-anim-cl.gif

But, i did found BBEdit is a shareware software it seems, i'm looking out for it on the net to see if it works for a while if i trie it in "Demo" mode.
Than i am gonna search for that Cron file.

Let you know smile.gif
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #23 on: September 14, 2003, 09:30:35 AM »
There's BBEdit Lite 6.1.2, but it's a lower version than you mentioned, so that won't work.

Found that Version 7.0.4 has a free trial for 30 days, i'm gonna give it a shot.
Actually i'm downloading already.

smile.gif
« Last Edit: September 14, 2003, 09:34:33 AM by Mrious_be »
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline kps

  • TS Addict
  • *****
  • Posts: 1693
    • View Profile
    • http://
OS X Maintenance
« Reply #24 on: September 14, 2003, 09:41:17 AM »
Sorry, Marcel, I thought you had a full version of BBEdit. The "demo" doesn't have the Terminal Tool.

No problem, with respect to the "terminal" thang....  biggrin.gif  I know we discussed it several times over the past year or so... smile.gif

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #25 on: September 14, 2003, 10:06:32 AM »
Found it all as you said:
QUOTE
# Run daily/weekly/monthly jobs.
15   3   *   *   *   root   periodic daily
30   4   *   *   6   root   periodic weekly
30   5   1   *   *   root   periodic monthly


Wanted to change it in:
QUOTE
# Run daily/weekly/monthly jobs.
30   5   *   *   *   root   periodic daily
45   5   *   *   1   root   periodic weekly
30   11   1   *   *   root   periodic monthly


But than i started doubting if it was ok to enter a two number digit on the "monthly" line?
I do not wanna screw up things biggrin.gif
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline kps

  • TS Addict
  • *****
  • Posts: 1693
    • View Profile
    • http://
OS X Maintenance
« Reply #26 on: September 14, 2003, 10:19:15 AM »
Yes, you can change it to any time you want...a two digit # is okay.

Just remember, you will need to be root and do it in the terminal if you don't have the full version of BBEdit.

Want me to post the instructions?

You should practice with the terminal and pico first....

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #27 on: September 14, 2003, 11:45:50 AM »
QUOTE(kps @ Sep 14 2003, 5:19 PM)
Want me to post the instructions?
You should practice with the terminal and pico first....

 Well you can post them, than i'll see if i change them or not.
If not, i'll use MacJanitor myself.

smile.gif
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline kps

  • TS Addict
  • *****
  • Posts: 1693
    • View Profile
    • http://
OS X Maintenance
« Reply #28 on: September 14, 2003, 03:48:06 PM »
Okay here goes:

Open the Terminal and at the prompt, (%)
type: sudo pico /etc/crontab
Password: enter your admin pswd

the crontab file will open in Pico with root privileges and look like this:

CODE
# /etc/crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute    hour    mday    month    wday    who    command
#
#*/5    *    *    *    *    root    /usr/libexec/atrun
#
# Run daily/weekly/monthly jobs.
35    9    *    *    *    root    periodic daily
30    9    *    *    6    root    periodic weekly
30    9    1    *    *    root    periodic monthly


Just by using your arrow keys to navigate, change the time values to what you want...in my case they're all around 9:30AM.

With pico you have to delete extra characters, as they will not be deleted as you type the new ones. Use control+D to do that. Place the cursor over the character to delete and complete the key sequence ^D.

When you're done changing the values type: control+O (the letter O) to write the changes from Pico's buffer to the actual file. Re-read it making sure you made no errors. Then hit the <RETURN> key. Next, to exit Pico,  hit control+X (the letter x) that'll return you to the prompt. That's it!

Type: exit to exit the terminal and stop any processes. Finaly, quit the terminal app.

Have fun!

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
OS X Maintenance
« Reply #29 on: September 14, 2003, 09:44:09 PM »
QUOTE(kps @ Sep 14 2003, 5:19 PM)
Just remember, you will need to be root and do it in the terminal if you don't have the full version of BBEdit.

 When i first read that you said this, it made me doubt if it was doable with this Demo version.
But than i remember that the website mentionted this:
QUOTE
The BBEdit 7.0.4 Demo is fully-featured and functional to offer a true test of the software -- it will expire after 30 days but it is otherwise identical to the retail version and can be activated with a serial number upon purchase. Enjoy!

So i'm pretty sure i can do it with this Demo i have now.
If not, it seems not to hard to do it with the terminal so i'll give that a try.
I wish i found a book that contained good explanations about the Terminal and maybe some Unix.
In Belgium however there isn't much to find for the Terminal use on OsX (most books only mention it slightly).

Thanks again smile.gif
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]