LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-06-2006, 10:03 AM   #1
Thulemanden
Member
 
Registered: Sep 2003
Location: Copenhagen, Denmark
Distribution: PC-BSD, PCLOS, MeeGo, Win 7
Posts: 189

Rep: Reputation: 30
cron job


What do I need to do to get a cron job to run every hour (/usr/bin/webaliser)?

Using Damn Small Linux as a web server with apache by the way.

I guess the line is

59 * * * * /usr/bin/webalizer

but is it to go into a saved file? Do I execute the line?

What am I then to name it and where is it saved? Is it a hidden file preceded with a dot?

Please answer in full.

I execute as root

/usr/bin/crontab 59 * * * * /usr/bin/webalizer

The reply is: 59 no such file or directory.

crontab do exist in /usr/bin

Thank you.

Last edited by Thulemanden; 11-06-2006 at 10:21 AM.
 
Old 11-06-2006, 11:40 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Edit your root crontab by doing:

/usr/bin/crontab -e

Edit the cron and add your webalizer command to run every hour:

0 * * * * /usr/bin/webalizer

Save and exit and check to see if it updated on the hour the next hour.

The line above for the webalizer command set in cron will run every hour on the hour. But you don't run crontab <command>, crontab is the file that is edited and read from crond that is running as a daemon/service.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cron job somsahi Linux - Software 9 10-05-2006 02:19 PM
cron job the_rhino Linux - Newbie 10 10-02-2004 03:34 PM
CRON Job tommytomato Fedora 12 09-13-2004 12:38 AM
cron job? luap Linux - Software 2 03-16-2003 08:48 AM
Cron job T-Rex Linux - Newbie 1 09-26-2001 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:34 AM.

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
Open Source Consulting | Domain Registration