Current location: Hot Scripts Forums » Programming Languages » PHP » automatically send email to the particular person everyday


automatically send email to the particular person everyday

Reply
  #1 (permalink)  
Old 05-08-06, 02:12 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
automatically send email to the particular person everyday

Hi!

I would like to introduce a PHP script, which take the user email from database and send email to our client on his/her birthday as well as when a specific service will end on the basic of end date, automatically.

the script will execute automatically everyday without any user interaction. As most of the forum use Corn Script to send email to the member on his/her birthday.

I can't understand how and where i put the script on my Linux webserver so that its runs everyday automatically.

Can anyone help me with this perticular issue?
Reply With Quote
  #2 (permalink)  
Old 05-08-06, 02:22 AM
scribby scribby is offline
Newbie Coder
 
Join Date: May 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
For the cron job it would be something like..

php -q /home/yourusername/public_html/script.php
Reply With Quote
  #3 (permalink)  
Old 05-08-06, 02:33 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
thanks for the reply!

but sorry i can't understand it properly. I am very new in world of PHP, please make it more detailed. so that i can understand what to do and how to set this script on my webserver.

Please help me.
Reply With Quote
  #4 (permalink)  
Old 05-08-06, 12:34 PM
Christian's Avatar
Christian Christian is offline
Community VIP
 
Join Date: Mar 2005
Location: ProgrammingTalk
Posts: 2,449
Thanks: 0
Thanked 6 Times in 5 Posts
This has some useful info about cron jobs http://www.unixgeeks.org/security/ne...ix/cron-1.html.
__________________
:: ImperialBB :: New version in the works! :: http://www.imperialbb.com ::

:: Have a question about the board? The Rules? An Infraction/Warning? :: Contact Form ::
Reply With Quote
  #5 (permalink)  
Old 05-09-06, 02:57 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Christian!

for these usefull information.

The moral is that, the Cron is already installed and running on Linux server or the webserver where our WEbsite is running, onlything I have to do is pass the script filename (whether is .cgi or .pl or .php) and time when this file will be executed automatically. after reading that cron topic, I have realise that it all example based on personal/local linux server where a person can easily add or modify or check whether the corn is running or not. am I rite?

now the question is how do i set my corntab? should i connact to our ISP for all setting or is there any other way to do it from myself? how do i execute those commande line code at webserver sitting at my local PC.

Please tell me what I need to do?
Reply With Quote
  #6 (permalink)  
Old 05-23-06, 11:11 PM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
We have decided to move to the new server and on the new server control point we have find one option called 'Crontab' with following options.

-----------------------------------
Show Crontab of: a list of following option [ root bin daemon adm lp sync shutdown halt mail news uucp operator games gopher ftp (FTP User) nobody (Nobody) rpm vcsa (virtual console memory owner) nscd (NSCD Daemon) sshd (Privilege-separated SSH) rpc (Portmapper RPC user) rpcuser (RPC Service User) nfsnobody (Anonymous NFS User) mailnull smmsp pcap apache (Apache) ntp webalizer (Webalizer) named (Named) mysql (MySQL Server) psaadm (Plesk user) psaftp (anonftp psa user) client1 alias qmaild qmaill qmailp qmailq qmailr qmails popuser ]

2) Send Crontab messages to address [we have to put email address]

3) TasksCrontab tasks (5)

S Min H DM M DW Command
1 * * * * echo "crontab job 1"
2 * * * * echo "crontab job 2"
3 * * * * echo "crontab job 3"
4 * * * * echo "crontab job 4"
5 * * * * echo "crontab job 5"
---------------------------------

can i add path of script at Crontab? or this command 'php -q /home/yourusername/public_html/script.php'

so on perticular time this script executed automaticaly without any page load through visitor or interaction from us.

I need your help guys to setup the above things.

Thanks.
Reply With Quote
  #7 (permalink)  
Old 05-24-06, 12:24 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Basic cron tutorial..........

Crontab is like an alarm clock. It's a TASK SCHEDULER. It's just a text file you create on your webserver (if they allow crontab - if they don't then MOVE to a REAL ISP.). The crontab file looks like this (below)

0 * * * * /etc/reset.cgi
0 0 * * * /etc/resetlogs.cgi

So what does this mean? Very simple. In this example we have a crontab file that contains 2 commands. A crontab file can have any number of commands. You put one command per line so [ 0 * * * * * /etc/reset.cgi ] is COMMAND ONE and [ 0 0 * * * /etc/resetlogs.cgi ] is COMMAND TWO.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]

Last edited by End User; 10-05-11 at 10:34 PM.
Reply With Quote
  #8 (permalink)  
Old 10-04-11, 05:00 PM
buzztroll buzztroll is offline
New Member
 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html page or database table to send by email rpain ASP 5 04-05-04 09:04 AM
send data to email jilshi Everything Java 0 04-02-04 08:50 PM
send email via local intranet superman PHP 3 06-29-03 12:20 PM


All times are GMT -5. The time now is 07:11 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.