how to run a php code daily automatically?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yogi1982
Forum Newbie
Posts: 4
Joined: Fri Mar 06, 2009 12:20 am

how to run a php code daily automatically?

Post by yogi1982 »

Hi

I need to run a php code daily. How can I run this php code daily as the date changed automatically?

Thanks in advance
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to run a php code daily automatically?

Post by Benjamin »

cron
yogi1982
Forum Newbie
Posts: 4
Joined: Fri Mar 06, 2009 12:20 am

Re: how to run a php code daily automatically?

Post by yogi1982 »

But I heard cron for linux only? I need on windows.
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: how to run a php code daily automatically?

Post by php_east »

yogi1982 wrote:But I heard cron for linux only? I need on windows.
windows->task scheduler would i think be what cron is to unix.
yogi1982
Forum Newbie
Posts: 4
Joined: Fri Mar 06, 2009 12:20 am

Re: how to run a php code daily automatically?

Post by yogi1982 »

php_east wrote:
yogi1982 wrote:But I heard cron for linux only? I need on windows.
windows->task scheduler would i think be what cron is to unix.

Will it also work when the system is shut down?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: how to run a php code daily automatically?

Post by papa »

The server needs to run of course.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to run a php code daily automatically?

Post by Benjamin »

yogi1982 wrote:
php_east wrote:
yogi1982 wrote:But I heard cron for linux only? I need on windows.
windows->task scheduler would i think be what cron is to unix.

Will it also work when the system is shut down?
Are you serious?
yogi1982
Forum Newbie
Posts: 4
Joined: Fri Mar 06, 2009 12:20 am

Re: how to run a php code daily automatically?

Post by yogi1982 »

of course I am serious. the server will run always.

Actually I read about phplist and that will work even when your system is shut down. That's why I was asking same for task scheduler.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to run a php code daily automatically?

Post by Benjamin »

Well, I'm just saying, if the server isn't running, nothing is going to run, much less scheduled jobs.
Post Reply