Ask a Question related to PHP Development, Design and Development.
-
L'Angel Admirable #1
Automated tasks
Hi,
I have an auction site running. Now I want the auction to be able to
automatically send a mail msg to the seller after it expires. How do I do
it? Obviously there is some sort of way that I can employ so that this task
does not require an operator (such as me) to run manually. This task will
involve accessing the database and sending an email. Can somebody enlighten
me on this?
==James==
L'Angel Admirable Guest
-
Automated PDF Creation
Many years ago we used to have a server that ran Distiller and we dragged and dropped files onto the server and PDFs were created. Then Adobe wrote... -
background tasks without "scheduled tasks"
I'm doing some work for a company that has an auction site running in coldfusion. They're not real happy with it, and it needs a major overhaul,... -
Automated updates
Hi, I am currently a university student in the UK and am studying business computing degree. For my dissertation I am researching the use of... -
Automated Filelist.
Hi! I want to build a PHP-Site, wich lists some downloadable files in some directories from our internet server. Can anyone tell me some... -
automated response
Hi... Just wanted to let you know we received your message. Corey and Jay http://www.coreyandjayshow.com... -
Louis-Philippe Huberdeau #2
Re: Automated tasks
You could run a PHP script from a cron task and verify if there are
mails to be sent. It wouldn't be sent at the exact second but I do think
it's the best solution. You could include a verification in your scripts
but running that every load is quite useless and takes CPU time off
your server.
L'Angel Admirable wrote:> Hi,
>
> I have an auction site running. Now I want the auction to be able to
> automatically send a mail msg to the seller after it expires. How do I do
> it? Obviously there is some sort of way that I can employ so that this task
> does not require an operator (such as me) to run manually. This task will
> involve accessing the database and sending an email. Can somebody enlighten
> me on this?
>
> ==James==
>
>Louis-Philippe Huberdeau Guest
-
Randell D. #3
Re: Automated tasks
"L'Angel Admirable" <jamesjiao@paradise.net.nz> wrote in message
news:9eXob.4420$ws.428845@news02.tsnz.net...task> Hi,
>
> I have an auction site running. Now I want the auction to be able to
> automatically send a mail msg to the seller after it expires. How do I do
> it? Obviously there is some sort of way that I can employ so that thisenlighten> does not require an operator (such as me) to run manually. This task will
> involve accessing the database and sending an email. Can somebodyPHP does not have a job scheduler so the short answer is no, you can't do> me on this?
>
> ==James==
this reliably using PHP alone.
The long answer is that you could have an external schedular, like
Unix/Linux cron that could call and activate your script... Alternativly,
you could have some check that when ever anyone visits your site, it checks
cloesd auctions and creates the mailers... but this would mean that the
email activity would only be acivated (unknowingly) by a visitor - thus a
server with a period of inactivity would not send the mailers... It really
wouldn't be reliable and could give mixed if implemented badly (ie two folk
visiting at the same time initiating two checks on the same auctions
resulting in two or more emails being sent out with the same notification
messages contained - or a timeout occuring before the scripts have properly
completed).
Your best bet would be an external schedular, like cron.
Randell D. Guest
-
L'Angel Admirable #4
Re: Automated tasks
Thanks.. Randell, I am just wondering where do the cron configuration files
reside on a redhat system, so that I can schedule some sort of tasks?
==James==
"Randell D." <you.can.email.me.at.randelld@yahoo.com> wrote in message
news:cf%ob.254615$9l5.132086@pd7tw2no...do>
> "L'Angel Admirable" <jamesjiao@paradise.net.nz> wrote in message
> news:9eXob.4420$ws.428845@news02.tsnz.net...> > Hi,
> >
> > I have an auction site running. Now I want the auction to be able to
> > automatically send a mail msg to the seller after it expires. How do Iwill> task> > it? Obviously there is some sort of way that I can employ so that this> > does not require an operator (such as me) to run manually. This taskchecks> enlighten> > involve accessing the database and sending an email. Can somebody>> > me on this?
> >
> > ==James==
> PHP does not have a job scheduler so the short answer is no, you can't do
> this reliably using PHP alone.
>
> The long answer is that you could have an external schedular, like
> Unix/Linux cron that could call and activate your script... Alternativly,
> you could have some check that when ever anyone visits your site, itfolk> cloesd auctions and creates the mailers... but this would mean that the
> email activity would only be acivated (unknowingly) by a visitor - thus a
> server with a period of inactivity would not send the mailers... It really
> wouldn't be reliable and could give mixed if implemented badly (ie twoproperly> visiting at the same time initiating two checks on the same auctions
> resulting in two or more emails being sent out with the same notification
> messages contained - or a timeout occuring before the scripts have> completed).
>
> Your best bet would be an external schedular, like cron.
>
>
L'Angel Admirable Guest
-
Andy Hassall #5
Re: Automated tasks
On Mon, 03 Nov 2003 03:28:32 GMT, "Randell D."
<you.can.email.me.at.randelld@yahoo.com> wrote:
Not sure about how Redhat sets this up, but it's quite normal for normal users>$ man 5 cron
>
>or
>
>$ man 5 crontab
>
>To understand the layout - however, if you have a rough idea on cron, then
>do
>
># crontab -e
>
>This will edit your existing crontab setup - Note, if you are not a root
>user, you must have root privilages (there is a file called cron.allow that
>would have usernames listed of those who do have cron access - secondly,
>becareful on how you write your scripts because they will be executed with
>'root' access - You could easily write a script to remove every file on the
>system... so check and double check your code).
to have cron access. Their jobs do NOT get run as root - that'd be a nightmare!
They get run as the owner of the crontab entry.
--
Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
Andy Hassall Guest



Reply With Quote

