LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-28-2004, 10:21 AM   #1
onlykims
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
crontab schedule help


Hi, all. I'm pretty new to Linux and am having trouble twisting the crontab to meet my needs. Could somebody help me out, please? I have a file that I have to back up to floppy the first Friday of every month only. What I have at this point is 0 15 1-7 * 5 find /documents/netinfo |cpio -o >/dev/fd0.
This is to be run at 3pm, but I get the horrible feeling that my command would cause it to be run on every day in the range of 1-7 - regardless of the Friday. I understand the fields are logically ORed and that makes life difficult.
Thanks for the help.
Kim
 
Old 08-28-2004, 11:10 AM   #2
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 34
The format is

min hour date month dow command

You are saying
0 15 1-7 * 5 command
which is
at 3pm,on the 1st thru the 7th, of every month, on fridays only

There shouldn't be a problem
or just do
0 15 * * 5 command


I believe if you add the v option to ur cpio command, you will get system mail showing you the file name that was archived. It is interesting that you are using cpio, since this looks like it will always overwrite the older file on the floppy, you could probably use tar, or even dd
 
Old 08-28-2004, 12:09 PM   #3
onlykims
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Original Poster
Rep: Reputation: 0
OK, so my crontab will work. If this was a real situation, I certainly wouldn't use cpio because it will overwrite the previous. This is a project I'm doing for college and cpio will work fine for them. Thank you so much for the clarification.
Kim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
schedule a crontab rupesh_pulikool Solaris / OpenSolaris 7 09-04-2004 09:32 PM
Schedule TOP command in Crontab. imsajjadali Red Hat 2 05-20-2004 04:12 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 11:25 AM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 01:57 PM


All times are GMT -5. The time now is 11:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration