?
Solved

auto script

Posted on 2003-02-28
6
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

765 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