Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2003, 11:30 PM
Registered User
 
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Builiding a time triggered process

Dear All,
         I am developing a website which will run all time. My requirement is that based upon time say 00.00 hrs in the server time I want to automatically initiate a process.

         To be more clear I want to send reminders to all the people whose due dates have expired. I can develop a module which will do all these functions in php. But I do not know how I can invoke the module at the time of expiry or say every day at 00.00 hours.

         So it should be a system initiated process which is triggered by time.

         Can it be done. I am using php, Apache & MySql. Any help will be appreciated.

                       Thanks in Advance.
                                                zicaden

 
Old September 6th, 2003, 05:20 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You need to set-up a cronjob (Unix)
Or schedule a task (Win32)

Check with your ISP to see if this functionality exists on the server.

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old September 8th, 2003, 02:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, you need to have the PHP interpreter installed as an executable for running scripts on the commandline. If your ISP only has PHP set up as an Apache module, ask them if they can install the executable as well. If not, you can compile it yourself (on unix) or download the .exe (on windows) and run your scripts through that.

To call a PHP script on the commandline:

prompt> php -q myscript.php

the -q option suppresses the HTTP headers it normally sends by default:
   Content-type: text/html
   X-Powered-By: PHP/4.3.2


Take care,

Nik
http://www.bigaction.org/
 
Old September 10th, 2003, 04:15 AM
Registered User
 
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you please provide me a guide how to set it up as a cronjob
Quote:
quote:Originally posted by quesadilla5
 You need to set-up a cronjob (Unix)
Or schedule a task (Win32)

Check with your ISP to see if this functionality exists on the server.

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::

 
Old September 10th, 2003, 04:44 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I haven't the foggiest of how to set up a cronjob. I only know that is the solution for running scripts on time triggered intervals. I just did a search of google which yielded a promising return of sites that discuss this in depth.

From what I can gather this is done at the command line. So you would likely telnet into the shell and plug in a few commands. Some ISPs have a nifty user front-end to this sort of thing and I would check for that before getting my hands dirty at the command line.

Try this:
http://www.google.com/search?q=set+up+cron+job

Best of luck!
: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum job process time out lathika ASP.NET 2.0 Basics 0 July 11th, 2007 02:26 PM
Logic builiding with Nested/Multiple IIF rohit_ghosh Access 4 May 4th, 2007 09:52 AM
Time triggered macro in MS Access d-fxt Access 6 December 19th, 2006 06:39 PM
Problem with CPU time in killing process Samatha General .NET 0 December 14th, 2006 06:37 AM
process every time anoop.goyal Classic ASP Basics 0 May 25th, 2006 01:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.