sreelu
1
hi,
i have to send an email once a day at ceratin time say 22.
i have tried with date commad, but not working.
HOUROFTHEDAY=`date +'%H'`
if [ $HOUROFTHEDAY = "22" ]; then
mailx -s "Info" emailid@org.com < $ProcessStatisticsFile
fi
Please help me...
sreelu
3
can you please tell me how to use crontab ?
Create a script...with following line like ....and save it.
mailx -s "<subject line>" <email-id> #u can also add text to mail u know how to do that
Then use below options,
crontab -e Edit your crontab file, or create one if it doesn't already exist.
crontab -l Display your crontab file.
follow ex below:-
to run a script at 22 PM EVERYDAY make this enrty in crontab file and save-------
0 22 * * * <mention the complete path of the script that u created above>
This will do the job