Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Timed Jobs


Message #1 by "Mark Carruth" <mcarruth@t...> on Sat, 12 Jan 2002 16:35:34 -0000
On the unix shell prompt:

crontab -e

This will put into an editor, most likely vi, where you can specify a cron
command:

	45 23 * * * /usr/local/bin/test.pl

The above cron command will run the script test.pl at 11:45 PM on every day
of every month. See man cron and man crontab for more info.

Roger





>OK, so how would one go about adding this command to crontab ? Can I just
>open the file as I would any other file in PHP? If so, which file is it I
>need to open in order to get this script to run daily.
>
>TIA,
>
>Mark Carruth
>
>
>> Have you tried running the script with php command?
>>	php script.php
>>If this works then you can include this command in a crontab.
>>
>>--- Joel Wickard <jwickard@l...> wrote:
>> learn perl
>> ----- Original Message -----
>> From: "Roger Jacobs" <raj@l...>
>> To: "professional php" <pro_php@p...>
>> Sent: Sunday, January 13, 2002 2:44 AM
>> Subject: [pro_php] Re: Timed Jobs
>>
>>
>> > But, what if PHP is installed as a module, not an executable?
>> >
>> > I am researching this one too. I want to run a script that looks at a
>> MySQL
>> > table, then emails out reminders for that date.
>> >
>> > I've tried cronning a shell script calling lynx and having lynx load the
>> > PHP page. No sucess yet.
>> >
>> > Roger
>> >
>> >
>> >
>> >
>> > >    The easiest way to do this if you are using Linux server is using of
>> > "crond". You can use it to run your script automatically every preriod of
>> > >time as you want.....
>> > >
>> > >Nopphapadol L.
>> > >Thailand.
>> > >----- Original Message -----
>> > >From: "Mark Carruth" <mcarruth@t...>
>> > >To: "professional php" <pro_php@p...>
>> > >Sent: Sunday, January 13, 2002 1:31 AM
>> > >Subject: [pro_php] Timed Jobs
>> > >
>> > >
>> > > Hi Guys,
>> > >
>> > > ** Firstly sorry for the HTML message I sent! my mistake! **
>> > >
>> > > What would be the best way to go about getting a script to
>> automatically
>> > >run
>> > > every day, or every 15 minutes or whatever.
>> > >
>> > > For example, a session timeout script, that cancels all the inactive
>> > > sesssions every 15 minutes. What I actually want to do is run a script
>> > >every
>> > > day that will tally up all the statistics for today, log them, and then
>> > > reset all the totals to 0 for the next day.
>>> > >
>> > > How would I go about doing this ?
>> > >
>> > > Regards,
>> > >
>> > > Mark Carruth
>> > >
>> > >
>> > >
>> > > ---
>> > > Change your mail options at <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://p2p.wrox.com/manager.as
>>p'>http://p2p.wrox.com/manager.asp</a> or
>> $subst('Email.Unsub').
>> > >
>> > >
>> > >
>> > >---
>> > >Change your mail options at <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://p2p.wrox.com/manager.as
>>p'>http://p2p.wrox.com/manager.asp</a> or
>> >
>> >
>> > --------------ROGER JACOBS - DATA SYSTEMS CONTRACTOR ----------------
>> > DataSpace Industries                    mailto:raj@o...
>> > 4491 Rice Street, Suite 102             <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://www.omnisphere.com'>htt
>>p://www.omnisphere.com</a>
>> > Lihue, HI  96766                        See Kauai Products & Services:
>> >  xxx-xxx-xxxx      FAX-246-4725           <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://www.lauhala.com'>http:/
>>/www.lauhala.com</a>
>> >
>> >
>> >
>> >
>> >
>> >
>> > ---
>> > Change your mail options at <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://p2p.wrox.com/manager.as
>>p'>http://p2p.wrox.com/manager.asp</a> or
>> >
>>
>>
>> ---
>> Change your mail options at <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://p2p.wrox.com/manager.as
>>p'>http://p2p.wrox.com/manager.asp</a> or
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Send FREE video emails in Yahoo! Mail!
>><a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://promo.yahoo.com/videoma
>>il/'>http://promo.yahoo.com/videomail/</a>
>>
>>---
>>Change your mail options at <a Target='_new'
>>Href='http://talk21.btopenworld.com/redirect.html?http://p2p.wrox.com/manager.as
>>p'>http://p2p.wrox.com/manager.asp</a> or
>
>
>
>--------------------
>talk21 your FREE portable and private address on the net at
>http://www.talk21.com
>
>
>


--------------ROGER JACOBS - DATA SYSTEMS CONTRACTOR ----------------
DataSpace Industries                    mailto:raj@o...
4491 Rice Street, Suite 102             http://www.omnisphere.com
Lihue, HI  96766                        See Kauai Products & Services:
 xxx-xxx-xxxx      FAX-246-4725           http://www.lauhala.com






  Return to Index