Re: Confusion about scheduling tasks with crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Oct 18, 2009 at 11:11 AM, ne... <guhvies@xxxxxxxxx> wrote:
> On Sun, Oct 18, 2009 at 16:09, Niki Kovacs <contact@xxxxxxxxxxxxx> wrote:
>
>> I have to setup a scheduled task on a server, and I just read through
>> some crontab docs. Now I'm confused. It's not so much the syntax of the
>> cron job to define (I got that), it's more... how do I get to define it?
>> Use a text editor (vi or the likes) to edit /etc/crontab directly? Or
>> create some empty file in /etc/cron.daily or /etc/cron.hourly or the
>> likes and then edit it using crontab -e ?
> As root, crontab -e. This is all you need.

If the script is to run as root and you aren't overly concerned about
the precise time your script runs, only that it runs at these
intervals, you can place your script or a soft-link to your script in
one of the directories /etc/cron.monthly, /etc/cron.weekly,
/etc/cron.daily and /etc/cron.hourly.

Any output from your script will be emailed to you, if this is setup.

To the best of my knowledge the scripts in these directories are run
in alphabetical order, you can control the order if desired by the
naming of the script.

In this case, crontab -e is not needed, create your script in our
favorite editor.

Brett
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux