Cron Jobs - TwoWheelForum: Motorcycle and Sportbike forums
Reply
 
LinkBack Thread Tools Display Modes
post #1 of 29 (permalink) Old 10-22-2007, 11:37 AM Thread Starter
 
Join Date: Jul 2007
Posts: 901
Cron Jobs

For all you nerds out there...

Say I have a tftp server running on 10.1.7.1 and I have an IDS machine that makes a daily log and places it in /opt/dragon/DB. The log file naming convention is dragon.xxx (the x being a sequential number such as 101, 102, 103, etc.)

So to make the transfer of the log into a cron job, he's what I think I should do:

vim dragon_log_backup.sh
tftp 10.1.7.1
put dragon.xxx
quit

Then put the .sh file into the cron.daily folder?

Right on. Thanks for the help.
kbubp is offline  
Sponsored Links
Advertisement
 
post #2 of 29 (permalink) Old 10-22-2007, 11:46 AM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
geek ty

And your welcome
PlayfulGod is offline  
post #3 of 29 (permalink) Old 10-22-2007, 11:53 AM Thread Starter
 
Join Date: Jul 2007
Posts: 901
Quote:
Originally Posted by PlayfulGod View Post
geek ty

And your welcome
I don't know what this post means. BUT OK!
kbubp is offline  
post #4 of 29 (permalink) Old 10-22-2007, 12:28 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
Quote:
Originally Posted by kbubp View Post
I don't know what this post means. BUT OK!
I'm a geek not a nerd and I think you have to add a line to the /etc/crontab to get that to work correctly.
PlayfulGod is offline  
post #5 of 29 (permalink) Old 10-22-2007, 12:32 PM
Banned
 
trock's Avatar
 
Join Date: Jan 2007
Location: The fix
Posts: 2,149
Send a message via MSN to trock
<----This man doesn't understand this thread.
trock is offline  
post #6 of 29 (permalink) Old 10-22-2007, 12:34 PM
TWF Board Of Directors

 
Trip's Avatar
 
Join Date: Oct 2005
Location: Knoxville, TN
Posts: 11,484
Send a message via AIM to Trip
Quote:
Originally Posted by PlayfulGod View Post
I'm a geek not a nerd and I think you have to add a line to the /etc/crontab to get that to work correctly.
Too many IT people out there to be geek or nerds now. It's just standard. Hell look at kyle, he is one.

2005 Honda CRF88RR - 2007 Honda CBR600RR
Trip is offline  
post #7 of 29 (permalink) Old 10-22-2007, 12:56 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
Quote:
Originally Posted by Trip View Post
Too many IT people out there to be geek or nerds now. It's just standard. Hell look at kyle, he is one.
PlayfulGod is offline  
post #8 of 29 (permalink) Old 10-22-2007, 12:56 PM
TWF Board Of Directors
 
Join Date: Jun 2006
Posts: 10,074
Quote:
Originally Posted by Trip View Post
Too many IT people out there to be geek or nerds now. It's just standard. Hell look at kyle, he is one.
Speak for yourself.
Rider is offline  
post #9 of 29 (permalink) Old 10-22-2007, 12:58 PM Thread Starter
 
Join Date: Jul 2007
Posts: 901
Quote:
Originally Posted by PlayfulGod View Post
I'm a geek not a nerd and I think you have to add a line to the /etc/crontab to get that to work correctly.

Depends. Some systems have individual folders for hourly, daily, monthly, and yearly and cron will automatically run those accordingly. Other systems you have to put a line in the crontab.

But yeah, I just tested it with a cp command and it worked, so the tftp command should work too.

I just edited the syslogd.conf file to shoot the syslog to my MOM server.

YOU LIKE THAT?!
kbubp is offline  
post #10 of 29 (permalink) Old 10-22-2007, 01:02 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
Quote:
Originally Posted by kbubp View Post
Depends. Some systems have individual folders for hourly, daily, monthly, and yearly and cron will automatically run those accordingly. Other systems you have to put a line in the crontab.

But yeah, I just tested it with a cp command and it worked, so the tftp command should work too.

I just edited the syslogd.conf file to shoot the syslog to my MOM server.

YOU LIKE THAT?!
why use tftp tho? I prefer sftp
PlayfulGod is offline  
post #11 of 29 (permalink) Old 10-22-2007, 01:10 PM Thread Starter
 
Join Date: Jul 2007
Posts: 901
Quote:
Originally Posted by PlayfulGod View Post
why use tftp tho? I prefer sftp
HOW ABOUT FTP WRAPPED IN AN SSH SESSION!?!lc
kbubp is offline  
post #12 of 29 (permalink) Old 10-22-2007, 01:19 PM
 
Join Date: Mar 2006
Posts: 5,152
d00d thatd be haxorZ
Crazy250 is offline  
post #13 of 29 (permalink) Old 10-22-2007, 01:19 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
Quote:
Originally Posted by kbubp View Post
HOW ABOUT FTP WRAPPED IN AN SSH SESSION!?!lc
hence sftp. Only tyme I have used tftp was loading conf's into a cisco or messing with the settings in a modem. Thats why I asked
PlayfulGod is offline  
post #14 of 29 (permalink) Old 10-22-2007, 01:44 PM
 
R1HOOLIGAN's Avatar
 
Join Date: Jun 2006
Location: Sebring, Florida
Posts: 532
Would this make a lot more sense to me if I indulged in some herbal essence??

2005 GIXXER 1K and 2008 ZX 10R.
R1HOOLIGAN is offline  
post #15 of 29 (permalink) Old 10-22-2007, 01:56 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
Quote:
Originally Posted by R1HOOLIGAN View Post
Would this make a lot more sense to me if I indulged in some herbal essence??
it might if you stayed at a holiday in express
PlayfulGod is offline  
post #16 of 29 (permalink) Old 10-22-2007, 01:57 PM
Banned
 
PlayfulGod's Avatar
 
Join Date: May 2007
Location: Dalton, Georgia
Posts: 9,569
Send a message via AIM to PlayfulGod Send a message via MSN to PlayfulGod
cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule.
PlayfulGod is offline  
post #17 of 29 (permalink) Old 10-22-2007, 02:01 PM
TWF Board Of Directors

 
Trip's Avatar
 
Join Date: Oct 2005
Location: Knoxville, TN
Posts: 11,484
Send a message via AIM to Trip
Quote:
Originally Posted by PlayfulGod View Post
cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule.
way to quote wikipedia without giving reference

2005 Honda CRF88RR - 2007 Honda CBR600RR
Trip is offline  
post #18 of 29 (permalink) Old 10-22-2007, 02:06 PM
 
PiZdETS's Avatar
 
Join Date: Jun 2007
Location: Kentucky
Posts: 912
There is a god among men in this picture....look carefully


This is uncle Pearl, he works at the sunoco in compton.


Word foo, holla.


Quote:
Patience is something you admire in the driver behind you and scorn in the one ahead. ~Mac McCleary
PiZdETS is offline  
post #19 of 29 (permalink) Old 10-22-2007, 02:08 PM
TWF Board Of Directors

 
Trip's Avatar
 
Join Date: Oct 2005
Location: Knoxville, TN
Posts: 11,484
Send a message via AIM to Trip
post whore in the post whore thread

please and thank you

2005 Honda CRF88RR - 2007 Honda CBR600RR
Trip is offline  
post #20 of 29 (permalink) Old 10-22-2007, 02:09 PM Thread Starter
 
Join Date: Jul 2007
Posts: 901
Quote:
Originally Posted by PiZdETS View Post
There is a god among men in this picture....look carefully


I FOUNDZ HIM!

Top row, third from right.
kbubp is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the TwoWheelForum: Motorcycle and Sportbike forums forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may 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 On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome