Re: scheduling a script to check a directory for files
| From: | Marc Weber | Date: | Wed, 30 May 2007 12:57:14 +0000 |
| Subject: | Re: scheduling a script to check a directory for files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255804@lists.php.net to get a copy of this message | ||
> I need to write a script to import '.csv' data files into MySQL.
>
> My question is how can I have a script execute and check a directory
> every 4 hours for any '.csv' files and if it finds any calls a function
> to import them?
On linux there is cron (you should find many example by googling) on
windows there is the task scheduler...
And then finally you can use PHPs delay func and a loop ;)
The any part can be done by globbing, DirectoryIterator, shell scripts
..
Marc