cron job commands

Status
Not open for further replies.

bunglebrown

New Member
Messages
157
Reaction score
0
Points
0
what is the technique for inputting a script or command as a cron job? I have a database table which I want to use to send emails.
 

bunglebrown

New Member
Messages
157
Reaction score
0
Points
0
Sure. I have a database table set up with 'name', 'email', 'subject', 'body' and 'send time'. 'Subject' and 'body' are always the same, but 'name' and 'email' are entered by the user which are saved into the database, the 'send time' records the time the details were submitted and adds three days - this is when I want an email containing this information in the database 'subject' & 'body' to the user. So I want to use a cron job command to somehow send this information on the 'send time' of each entry.

I hope this is clear and that you can help.

thanks
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
I recommend creating a PHP script that gets the information from the database and sends the e-mails.
You could then a a cron job to run the PHP script every so often (Not more than once every 5 minutes.)

Example Cron Job said:
php-cron -q /home/username/path/to/php/script.php
 
Status
Not open for further replies.
Top