scheduler Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scheduler Script
# 1  
Old 04-05-2011
scheduler Script

Hi,

My requirement is i want to send mails from server to all my employess with one attachment file for every monday and friday like scheduler.. how it is possible through bash script. please guide me..


With Regards
Anish Kumar.V
# 2  
Old 04-05-2011
Using mailx and uuencode :
Code:
 (uuencode FILENAME ATTACHNAME) | mailx -ms "Subject" mail@mail

You can also use mutt.

Use cron to setup the day (notice weekday) for script execution.

crontab manual :

minute hour monthday month weekday command
weekday The day of the week, 0-6, 0=Sunday
# 3  
Old 04-05-2011
Hi Peasant,

Mail is not a prob but...i need to send same attachment to N number of mail ids for example


if i have 3 mail ids means

07anis@gamil.com
anish@gamil.com
kumar@gmail.com

at the same time i need to send mail from server to this 3 mail ids.


i think using script we can do that..

like we need to assign all the mail ids store into one file form that we need to get input..that code only i am searching how to do that process...if you have any idea means please share..

With Regards
Anish Kumar.V
# 4  
Old 04-05-2011
you can add the mail ids in one command:
Code:
mailx -ms "Subject" 07anis@gamil.com, anish@gamil.com, kumar@gmail.com

# 5  
Old 04-05-2011
hi rdcways,

for 3 mail id means this command okay but i need to send nearly 200 mail -ids then...how ?
# 6  
Old 04-05-2011
set a group mailbox and add 200 ids in it.
# 7  
Old 04-06-2011
If you are unable to do so, as rdcwayx suggested, feel free to use FOR I IN or WHILE READ LINE formulations with some kind of plaintext file with emails in.

Also something like this should work (not tested)
Code:
mailx -ms "Subject" $(cat emails.txt)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Crontab scheduler to execute script every 45 days

Can someone please help me on how to schedule script to run every 45 days in crontab ? Thanks, Prince (5 Replies)
Discussion started by: prince1987
5 Replies

2. Shell Programming and Scripting

Control - M Scheduler is not able to pick my shell script

Hi, Below is a shell script that i made:- #!/bin/ksh #path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/ if ; then echo "ZIP Exists and now Processing" for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.* do unzip $files echo "Files Unzipped" echo $files... (4 Replies)
Discussion started by: mmtrexon
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Control - M Scheduler is not able to pick my shell script

Hi, Below is a shell script that i made:- #!/bin/ksh #path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/ if ; then echo "ZIP Exists and now Processing" for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.* do unzip $files echo "Files Unzipped" echo $files... (1 Reply)
Discussion started by: mmtrexon
1 Replies

4. Shell Programming and Scripting

ksh script not working if triggered by scheduler

I have a script that works well if i execute manually using informix user. However, it does not execute properly if triggered using the scheduler (ESP). This is the partial part where it doesn't work. i added some tracing but i can't figure it out. #!/bin/ksh let db_is_up=0... (6 Replies)
Discussion started by: tungaw2004
6 Replies

5. UNIX for Dummies Questions & Answers

Linux scheduler....

HI could you comment on my small doubts below 1. which type of sheduler is used inb linux?? is it round robin or multi queue priority based round robin ??? 2. Which process has the PID 0 ?? if it is sheduler process then how to convinience myself?? i mean how to see on the system...?? is... (0 Replies)
Discussion started by: raj_b025
0 Replies

6. UNIX for Dummies Questions & Answers

Script ran by job scheduler fails from the 15th to the 20th of the month

Hi, I have a script that finds the application logs from the previous day and sends it to another server via ftp. The code is something like this: yest_date=`TZ=CST+24 date "+%b %d"` logdir=/app/logs logs=app*.log tmpdir=/tmp cd $logdir for i in `ls -1 $logs` do chkstr=`ls -1l $i | grep... (2 Replies)
Discussion started by: tatchel
2 Replies

7. Shell Programming and Scripting

$HOME Not Getting Set for Oracle Scheduler Script at Runtime

We are researching the possibility of using Oracle 10g Scheduler on Solaris 10 to launch scripts at our site, and the script that I am testing does not get $HOME (and other environment variables) set correctly. Here is the Korn shell script (show_info.ksh): #!/usr/bin/ksh id env | sort Here... (4 Replies)
Discussion started by: shew01
4 Replies

8. UNIX for Advanced & Expert Users

command to schedule a unix script in tidal' scheduler

hi i am needed to use tidal's scheduler to schedule unix scripts available on server A. while creating a job to be scheduled, it has an option called command which will take a path of the file. i have seen several examples in the following way e:\tidal\bin\sleep.exe here i did not understand two... (0 Replies)
Discussion started by: balireddy_77
0 Replies

9. Shell Programming and Scripting

event scheduler/tracker script

Dear All, I am writing an event tracker shell script as part of a personal project. I am trying 2 write a sort of date math function using the GNU date command. This function would allow 2 search 4 future events, like looking 4 events 1 or 2 days ahead 4 instance. I've used the date command b4... (1 Reply)
Discussion started by: theangrybeaver
1 Replies

10. UNIX for Dummies Questions & Answers

Scheduler in Solaris

I am using Sun Solaris Where I can find scheduler program that can run another program automatically on scheduled time? Thank you. (1 Reply)
Discussion started by: wadiachmed
1 Replies
Login or Register to Ask a Question