Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

auto script

Posted on 2003-02-28
6
Medium Priority
?
270 Views
Last Modified: 2006-11-17
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.
0
Comment
Question by:bapperlo
6 Comments
 
LVL 8

Expert Comment

by:us111
ID: 8041896
0
 
LVL 2

Expert Comment

by:ShockwaveRK
ID: 8041943
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
 
LVL 8

Expert Comment

by:us111
ID: 8042036
the other solution is to use lynx with a cron job:

* 10 * * *  /usr/bin/lynx http://www.domain.com/file.php
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:us111
ID: 8042037
the other solution is to use lynx with a cron job:

* 10 * * *  /usr/bin/lynx http://www.domain.com/file.php
0
 
LVL 15

Expert Comment

by:VGR
ID: 8043889
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
 
LVL 4

Accepted Solution

by:
duerra earned 300 total points
ID: 8048003
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question