Jump to content


autorun php script


2 replies to this topic

#1 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 07 December 2007 - 06:07 PM

hi guys

im sure everyone understands that when you open a php page it executes the script...

my problem is that i want to be able to execute the script without having to open the page.

so say at 12 midnight each night a php script is run to update my database...

thats all i need, is there any way of doing that?

cheers

The Creator

#2 Wildhoney

    Young Padawan

  • Members
  • Pip
  • 31 posts

Posted 07 December 2007 - 08:35 PM

You will be wanting to set-up a crontab to execute the PHP file. This can be done quite easily, simply summon the PHP interpreter to execute the PHP file: /path/to/php php_file.php

#3 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 07 December 2007 - 09:25 PM

This is a frequently asked question, please use the forum search/google (ref: cron jobs).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users