auto script

Is it possible to create a php-script that runs at a specific time, for example at midnight. I need some sort of script that checks a database and when it finds a record with the date of that day, then a mail must be send at the person who is responsible for the record.
bapperloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

us111Commented:
0
ShockwaveRKCommented:
Hi,

Yes it is possible you will need to create a script that has no output(this is the best choice), if you do want to output stuff put it in a db or mail it with the mail() function. And then run it with a standalone php binary on the webserver. This is the tricky part not all webservers have this and i do not know if this is possible on windows. On a linux box it is quite simple, on the php site there is a tuturial for this. and than put it in the cron off your linux box. if you do not know how to do this contact your ISP.

--
Greetz
Robert
The Netherlands
0
us111Commented:
the other solution is to use lynx with a cron job:

* 10 * * *  /usr/bin/lynx http://www.domain.com/file.php
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

us111Commented:
the other solution is to use lynx with a cron job:

* 10 * * *  /usr/bin/lynx http://www.domain.com/file.php
0
VGRCommented:
or my RobotOuaibe program, who launches URIs at specified time of each day. I use it all the time. It's free and 200KB See www.edainworks.com
0
duerraCommented:
Are you hosting yourself, or are you using somebody else?  Are you/they running a Windows server?  If you are hosting it, and you're running a windows server, you'll have to download a cron program for windows.  The best one yet that I've found is "nncron", it can be found here:

http://www.nncron.ru/

I use the lite version.  If you're using a lynx server, then it will already have cron, though if you're not hosting yourself, you'll need to get special permission from your hosting company if they don't allow users to use cron jobs.

It's very easy to use, and there's tutorials all over the net if you have any questions.

Hope this helps!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.