Mailing a file at a particular time interval


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mailing a file at a particular time interval
# 1  
Old 09-03-2011
Mailing a file at a particular time interval

Folks,
I need to send a .log file to my email for every one hour from a server that too only in a particular time period. Is awk mandate here? or can we do it in shell scripting only? Please help me in sorting this out.

Cheers,
Arun
# 2  
Old 09-03-2011
Quote:
Originally Posted by ArunJanga
...Is awk mandate here?...
No.

Quote:
Originally Posted by ArunJanga
...can we do it in shell scripting only?...
Yes.

tyler_durden
# 3  
Old 09-04-2011
Please guide me how can I do it...
# 4  
Old 09-04-2011
just put in crontab for every 1 hr ...something like this

Code:
 
 
00 * * * *  cat <path of logfile> | mailx email@some.com

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to send mail at specific calculated time interval?

Hi All, I want to send an email if the time difference from previous mail sent is more than or equal to 30 mins. I have written below code and it's working fine. In this script I am storing previous mail sent time in txt file. Instead of storing in txt file how to store in a variable.... (8 Replies)
Discussion started by: nalu
8 Replies

2. Linux

Help Me: How to set ARP stale time interval on linux platform for Ipv6 interface

Hi, Can any one please help me increase the arp stale time of an ipv6 interface on linux platform ? I have tried increasing the variable gc_stale_time but that doesnt work. Thanks (2 Replies)
Discussion started by: dkothapa
2 Replies

3. Shell Programming and Scripting

How to run a script everyday between 7 and 8 pm with the time interval of 5 minutes?

Hi, Can someone help me in running a cronjob everyday between 7 and 8 pm with the time interval of 5 minutes in between to repeat that script. The script is so small and I need that to run daily between this time. Please if possible provide me the syntax for this logic. Thanks. (4 Replies)
Discussion started by: cya
4 Replies

4. UNIX for Dummies Questions & Answers

Copying files between two time interval

Hi All, I am new to this forum.... Can neone please help me how to copy files between two time intervals i.e. I need to copy files from 6.30 to 9.30 on 5th June 09. Any help is appreciated. (2 Replies)
Discussion started by: Pratik4891
2 Replies

5. UNIX for Dummies Questions & Answers

Run script in the background with a time interval

I have a script I want to run in the background, and I have looked it up but I am not exactly sure how to do. First of all to run it in the background do you have to put something in the script or is it just a command when you go to run it. I found this solution to it but once again I am not to... (2 Replies)
Discussion started by: mauler123
2 Replies

6. Shell Programming and Scripting

script to run repeatedly after a fixed interval of time

Hi , I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose. #!/bin/sh diff common.log... (3 Replies)
Discussion started by: himvat
3 Replies

7. Shell Programming and Scripting

To extract data of a perticular interval (date-time wise)

I want a shell script which extract data from a log file which contains date and time-wise data and i need the data for a perticular interval of time...what can i do??? (3 Replies)
Discussion started by: abhishek27
3 Replies

8. Shell Programming and Scripting

Generating files with time interval of fifteen minutes

Hi Guys, I have two dates as start date and end date.. i need to generate files within these two dates with time interval of half an hour.... i.e. Start Date=25/09/07 12:00:00 End Date=26/09/07 12:00:00 Now i need to generate files every half an... (0 Replies)
Discussion started by: aajan
0 Replies

9. Programming

change time interval for /proc/loadavg calculation

Hi friends, I need to find average load on my server. The problem would have been quite simple had I required the load averaged over 1 min,5 min or 15 min which I can easily find reading /proc/loadavg (the same as shown by 'uptime') but my requirement compels me to find load averaged over 10 sec or... (2 Replies)
Discussion started by: Rakesh Ranjan
2 Replies

10. Solaris

Time Wait interval

What is the time_wait interval for Solaris 8/9??? and is it configurable??? For example sometimes a clients pc will freeze up dropping the connection, closing the port. The problem is on our side our system still thinks their logged in (until it realizes it dropped on the otherside and drops on... (1 Reply)
Discussion started by: eloquent99
1 Replies
Login or Register to Ask a Question