473,769 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email scheduling through Cron and php

Hello All,
I have come accross a very interesting as well as a very complex
scenario with my current project. My worry is the scheduling of email
messages and execution of that based on the cron jobs.
For this I am using cron .Suppose Cron is set to execute a file after
every five minutes .It executes and returns all the details of
scheduled emails suppose 10.
Now my problem is how can I synchronize this with the current date
and time so that each and every messge is being sent at correct date/
time.

Thanks ,
Jan 8 '08 #1
4 2393
On Tue, 08 Jan 2008 12:46:14 +0100, Rahul <ra******@gmail .comwrote:
Hello All,
I have come accross a very interesting as well as a very complex
scenario with my current project. My worry is the scheduling of email
messages and execution of that based on the cron jobs.
For this I am using cron .Suppose Cron is set to execute a file after
every five minutes .It executes and returns all the details of
scheduled emails suppose 10.
Now my problem is how can I synchronize this with the current date
and time so that each and every messge is being sent at correct date/
time.
Store the time to be sent with the email to be sent, and only send those
in need of sending? If you want more details, we'll have to know how
scheduled mails are stored.
--
Rik Wasmus
Jan 8 '08 #2
Rahul wrote:
Hello All,
I have come accross a very interesting as well as a very complex
scenario with my current project. My worry is the scheduling of email
messages and execution of that based on the cron jobs.
For this I am using cron .Suppose Cron is set to execute a file after
every five minutes .It executes and returns all the details of
scheduled emails suppose 10.
Now my problem is how can I synchronize this with the current date
and time so that each and every messge is being sent at correct date/
time.

Thanks ,
Not sure what the problem is.

If its standard mails to be sent at standard times, edit the cron script.

If its a message to be sent once at a particular time, use the 'at '
command.

Not sure where PHP comes into this either...

Jan 8 '08 #3
On Jan 8, 4:46 pm, Rahul <rahul...@gmail .comwrote:
Hello All,
I have come accross a very interesting as well as a very complex
scenario with my current project. My worry is the scheduling of email
messages and execution of that based on the cron jobs.
For this I am using cron .Suppose Cron is set to execute a file after
every five minutes .It executes and returns all the details of
scheduled emails suppose 10.
Now my problem is how can I synchronize this with the current date
and time so that each and every messge is being sent at correct date/
time.

Thanks ,
Big thanks to all.Anyhow I have managed to sort out this problem.Now
I am testing with all scenario
and will get back with my logic as soon I end up.
Thanks
Rahul

Jan 10 '08 #4
Hello,

on 01/08/2008 09:46 AM Rahul said the following:
Hello All,
I have come accross a very interesting as well as a very complex
scenario with my current project. My worry is the scheduling of email
messages and execution of that based on the cron jobs.
For this I am using cron .Suppose Cron is set to execute a file after
every five minutes .It executes and returns all the details of
scheduled emails suppose 10.
Now my problem is how can I synchronize this with the current date
and time so that each and every messge is being sent at correct date/
time.
It seems you want something like this class. It stores scheduled
messages in a database for later delivery eventually with cron:

http://www.phpclasses.org/newsletter

--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Jan 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4958
by: Mark | last post by:
Is there anyway I can set up a personal 'remailer' type of thing on my domain ? I can not email a friend at his workplace because his company have put a 'block' on emails from my work address (the companies we work for are considered rivals) - I am after a way to 'bounce' or forward an email, so my originating address isn't shown. I have tried email forwarding (in CPanel) using addresses set up
4
1837
by: toufik toufik | last post by:
Hi, I've script (or a php file) in the server that I like to execute at 8.00 in the morning every day. (It will check info in the DB and send emails.) Any Idea about how I can do it. Thanks.
0
2563
by: steve | last post by:
I've seen questions about scheduling ASP scripts posted in this group many times so hopefully this will be useful information to a few people. I just wanted to let you all know that our script scheduling service at www.cronservice.co.uk has been rewritten from the ground up and is now better than ever. If you are looking for a way to schedule your ASP scripts and don't have access to cron or task scheduler then you need this service.
2
1377
by: Piotr | last post by:
Hi I have discovered this great program and I wish to use it for data import from dbf to MySql. I wonder if there is possibilty to schedule automatic data import ?
6
2895
by: Csaba Gabor | last post by:
I would like to use the AT command under Win XP to schedule (CLI) php.exe. I thought it would be as easy as: AT 7:11 "php c:\phpapps\himom.php". However, this gives me an error. My solution is inducing the gag reflex in me, so perhaps someone can point out an improvement. himom.php (to show a Message Box) looks like so: <?php function popup ($text, $title="PHP popup", $timeout=4, $style=131120) { $oWSH = new COM("WScript.Shell");
3
10313
by: the.natalie | last post by:
Hi. I am a newbie to mysql, cron, and shell scripting, so please bear with me. I have a script that is used for updating an image directory based on contents in a database. The script does the following: runs several queries against different tables in a database; returns several lists of pictures being used in the database; removes any obsolete images from specific directories. The script is bash shell script. The problem is that...
4
2848
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
7
1685
by: odysseyphotography | last post by:
A friend would like to have a signup form on his site. Anyone that signs up will be entered into a database and automatically sent an email report. This much I can do! However, he'd then like the person to recieve a further 2 reports with a specified delay (say a week) between each email. He'd like this process to be automated - sending anyone who signs up the three reports with a week between each emailing. Any ideas on how this is...
5
2406
by: scriptee | last post by:
Hi , I wan to run a php script using cron on my host server. Its a Linux based server and I am allowed to use cron. I want to run a php script with includes. I tried some suggestions which I found on the net but it didn't work the include files are not executed. I am new to cron but knows the basic. Any help is much appreciated.
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.