Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Linux Operating System > Technical
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-14-2005, 05:30 AM   #1 (permalink)
ultan
Member
 
Join Date: Sep 2005
Posts: 59
Default How to setup Cron jobs?

I don't have any GUI on, is there a way or place for me to set the cron jobs?
Or let other users use their own cron jobs?
Because I read that running as root is dangerous.
ultan is offline   Reply With Quote
Sponsored Links
Old 09-14-2005, 05:47 AM   #2 (permalink)
cornelis
Member
 
Join Date: Sep 2005
Posts: 62
Default

Try looking in the /etc directory or many do a locate crontab
I think you can specify what user you want it to run as on there as well.
cornelis is offline   Reply With Quote
Old 09-15-2005, 02:55 AM   #3 (permalink)
allon
Senior Member
 
Join Date: Sep 2005
Posts: 104
Default

A suggestion is to set up cron directories in their sites and then tell them which folder will be excuted daily, weekly, monthly etc etc.
But of course as their own user.
allon is offline   Reply With Quote
Old 09-17-2005, 04:53 PM   #4 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 34
Default

Hi,

If you install webalizer from redhat rpm the following script is placed in /etc/cron.daily: It is actually named 00webalizer so that it is executed before all the other scripts in /etc/cron.daily AND (owner/group root and permissions 755).

If you wanted to run Webalizer daily from my /etc/cron.daily directory at 12:05am
PHP Code:
SHELL=/bin/bash
PATH
=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO
=root
HOME
=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 
* * * root run-parts /etc/cron.daily
22 4 
* * 0 root run-parts /etc/cron.weekly
42 4 1 
* * root run-parts /etc/cron.monthly

# sysstat
* * * 0,/usr/lib/sa/sa1 600 6 &
5 19 * * * /usr/lib/sa/sa2 -&

# webalizer (run daily at 12:05 am)
05 0 * * * root run-parts /etc/cron.daily2 
This is something I do. Create a directory called (for example) /etc/cron.daily2 and place the equivalent webalizer script in it. Then edit /etc/crontab so that you have 'run-parts' (/usr/bin/run-parts script) do what it does for /etc/cron.daily but at a different time :

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
5 0 * * * root run-parts /etc/cron.daily2

cheers
sandman is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 08:52 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums