473,372 Members | 950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Running php file everyday on scheduled time

Hi,
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.

Jul 21 '06 #1
7 4402
Rik
sachu wrote:
Hi,
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.
Usually that's done using a cronjob on the server.

Grtz,
--
Rik Wasmus
Jul 21 '06 #2
I'm also having this issue on Windows server

Any ideas?

"sachu" <sa*********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Hi,
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.

Jul 21 '06 #3
sachu wrote:
Hi,
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.
I do this every night with several php scripts that DO things in an
unattended mode.

I make sure that I have the proper shebang (#!/usr/bin/php) as the first
statement of my script, then I create a cron job to run at the specified
time to execute the appropriate php script(s).

Works like a charm.

Bob
Jul 21 '06 #4
<comp.lang.php>
<bobmct>
<Fri, 21 Jul 2006 11:29:16 -0400>
<un*************@news.ntplx.net>
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.

I do this every night with several php scripts that DO things in an
unattended mode.

I make sure that I have the proper shebang (#!/usr/bin/php) as the first
statement of my script, then I create a cron job to run at the specified
time to execute the appropriate php script(s).

Works like a charm.
www.emailuser.co.uk/popular.php

Not a cron job - but the first person to look at the webpage after
midnight will fire up the 'process loops' and then save the results so
they can just be read in anytime afterwards .

$junko=date("l dS of F Y h:i:s A"); $coke=substr($junko,0,5);

$filename="demo/day_popular.php";
$fp=fopen($filename,"r"); $qaz=fgets($fp); $pepsi=trim($qaz); fclose
($fp);

if ($coke<>$pepsi)
{

BLAH BLAH RUN THE LOOPS - AND SAVE THE RESULTS

$filename="demo/day_popular.php";
$fp=fopen($filename,"w"); fwrite ($fp,$coke); fwrite ($fp,"\n"); fclose
($fp);
}
--
Encrypted email address
www.emailuser.co.uk/?name=KRUSTOV
Make a shorter url
www.vhit.co.uk
Jul 21 '06 #5
Veco wrote:
I'm also having this issue on Windows server

Any ideas?

"sachu" <sa*********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
>>Hi,
Is there is way to run a php file perodically everyday on scheduled
time in such a way that there is no human interaction and it
performence the written task.


In Windows you use Scheduled Tasks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 21 '06 #6
Can someone tell me the steps require to sheduele a php file...
This particular file checks the remote database for data modification
and update the same in the local database.This is periodic check and
has to be done in daily basis.
How can i schedule. please let me know in detail as am a newbie to this
php world.
Iam Using PHP5.0 Mysql and IIS.

Jul 22 '06 #7
sachu wrote:
Can someone tell me the steps require to sheduele a php file...
This particular file checks the remote database for data modification
and update the same in the local database.This is periodic check and
has to be done in daily basis.
How can i schedule. please let me know in detail as am a newbie to this
php world.
Iam Using PHP5.0 Mysql and IIS.
Scheduling the file is a Windows (or other OS) task. Check with your
Windows Administrator or search Microsoft for "Scheduled Task".

The executable will be your php.exe file with the parameter being your
script.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 22 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: pri10der | last post by:
Can somone explain me how to run some procedure everyday at 22:00 in MSSQL. This is not an Administrative Task, it's my procedure.
2
by: David Olive | last post by:
Hi guys, I'm having a bit of a problem getting a VB .NET console app to run happily as a scheduled task. The app itself generates a bunch of word documents on a file share on another server by...
4
by: DFS | last post by:
I have two nightly scheduled jobs at a client site - one at 2:00am and the other at 5:00am Both jobs launch Access 2003, log into the default system workgroup, open a Access .mdb that collects...
6
by: Dirk Reske | last post by:
Hello, I write an app that, logs events. how can I make, that everyday a new file whould be createt, with the date as name? thx -- ----------------------------------------------------
1
by: Michael Groeger | last post by:
Hi NG, I have written a service which should start at certain time in the morning and stop at a certain time in the evening. For this, I added the following to the Main() method of the service:...
4
by: RSH | last post by:
I have an application that creates an Access version of a SQL Server database and then it moves the resulting database to an ftp server for the client to download and run reports against etc. The...
9
by: LimaCharlie | last post by:
Good Day to all, Hope you could help me w/ my project. Im creating a DTS Package. The source data will be coming from an excel file going to my SQL table. The DTS package is scheduled to execute...
2
by: mscurto | last post by:
Is there a way to set up access to open and run a query in a particular database at a particular time each day? This would be run from a Windows 2000 desktop.
1
by: ranjitw | last post by:
I am running backup to .mdb file on a Windows 2003 server . My issue is that when the program completed it still is in a "running" state when I highlight the icon for the scheduled task I have to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.