Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page Crontab Entries
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 05-19-2008   #1 (permalink)
Just Joined!
 
Join Date: May 2008
Posts: 1
Crontab Entries

Hi I'm new here and just started using Linux. I need to use it for my university course but I've started to like it, and I'm enjoying learning about it. I am using my university notes to help me and I came across an example crontab entry that looks like this

0,30 20 * * 1 cat /var/log/syslog.1.gz >> /root/syslogs.gz


I read the manual on crontab and from what I gathered the format is the minute then hour, so I wonder why the example says 0,30. Would that be 12:30? Sorry for being such a newbie but the only way I can interpret the above crontab entry is that every January 20th, at 12:30 the contents of var/log/syslog.1.gz is appended to syslogs.gz in /root/syslogs.. I know I must be way off... any help appreciated. Also any ideas what the stars represent?
tm1776 is offline   Reply With Quote
Old 05-19-2008   #2 (permalink)
Linux User
 
Join Date: Oct 2007
Location: Tucson AZ
Posts: 400
The time entries are as follows starting at left (minutes, ...)
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)

The entry you have would run at 8:00pm and 8:30pm every Monday. The first entry "0/30" with the "/" means both at the top of the hour and 30 minutes past. Probably be easier to find out about cron by googling it as there are a large number of tutorials on it.
yancek is offline   Reply With Quote
Old 05-19-2008   #3 (permalink)
Linux Newbie
 
Join Date: Jun 2007
Posts: 224
yancek,

Actually his sample is 0,30 and not 0/30. His sample, which is using the comma, is specifying a list of minutes, 00 & 30. Yours, which is using the forward slash, specifies start at minutes 0 and step by 30. Both, in this case, produce the same results which is to run the command at 8:00 PM & 8:30 PM.
vsemaska is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 12:23 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0