Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Search Forums:



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-09-2010
Registered User
 

Join Date: Jul 2009
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Timed Scripts

Hi all

I need a little bit of help, i am looking for a script that can have different events in it and then if it is a certain day email me about it

some sort of email reminder system

any ideas

thanks
Sponsored Links
    #2  
Old 09-10-2010
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 

Join Date: Sep 2007
Location: Germany
Posts: 5,193
Thanks: 47
Thanked 280 Times in 267 Posts
If you are looking for a repeated reminder, check out cron/crontab:
http://www.unix.com/answers-frequent...n-crontab.html
If you are looking for a one-time reminder, check out the command at.
To send a mail, just use the mail command.

If you get stuck at a particular point, don't hesitate to ask.
Sponsored Links
    #3  
Old 09-10-2010
Registered User
 

Join Date: Mar 2010
Location: Pune, India
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
You can set cronjob for that script. And the output of that script you can direct to some file (say temp.txt) and then you can send that file via mail command to as many users as you want.
Mail command syntax is
uuencode [dir/filename] [filename] | mailx -s “subject” mail@address.com
or cat temp.txt | mailx -s "Subject_Name" dhruvak_chokshi@persistent.com abc@xyz.com
    #4  
Old 09-10-2010
Registered User
 

Join Date: Jul 2009
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Using cronjobs was what i was going to do but thay only allows for montly things, what about if i want to have a reminder for say 11 of October ?
Sponsored Links
    #5  
Old 09-10-2010
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 

Join Date: Sep 2007
Location: Germany
Posts: 5,193
Thanks: 47
Thanked 280 Times in 267 Posts
As already stated, use at instead then.

Example:

Code:
$> at 11 Oct 2010
warning: commands will be executed using /bin/sh
at> echo yo
at> <EOT>
job 7 at Mon Oct 11 09:30:00 2010
$> atq
7       Mon Oct 11 09:30:00 2010 a root

At this date, the echo will be fired off and disappear from the at queue.
For using a whole script, use the -f option to hand over a file.

Last edited by zaxxon; 09-10-2010 at 03:34 AM.. Reason: added info
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
RCP command timed out praviper Solaris 3 04-25-2010 01:15 PM
I/O timed out etcpasswd Solaris 5 08-12-2009 04:34 AM
Timed wait? anjul_thegreat Programming 4 06-29-2007 09:51 AM
How to Get Timed Input using cin uxbala Programming 5 02-23-2005 10:43 AM
Connection Timed out s_aamir UNIX for Advanced & Expert Users 2 11-20-2002 04:16 PM



All times are GMT -4. The time now is 04:14 AM.