SEARCH

The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Geek Stuff

Execute PHP script periodically

(7 posts)
  • Started 6 years ago by jmcguire
  • Latest reply from jmcguire
  • Topic Viewed 3230 times

jmcguire
jmcguire
Posts: 552

I am writing some script that uses PHP and IMAP.

I need the script to run every 10 minutes.

Can someone give me info on how to have PHP script execute in given intervals?

Note: this is not a website that needs to refresh while the user will be on it. The PHP script will be working with an IMAP server and needs to run every 10 minutes.

Thanks in advance.

Posted 6 years ago
Top
 
jd2066
jd2066
Posts: 3814

Do you want to run the script on your own computer or on a web host with a web site and IMAP?

Posted 6 years ago
Top
 
jmcguire
jmcguire
Posts: 552

It will be running on a server. There will be no web site though.

Posted 6 years ago
Top
 
jd2066
jd2066
Posts: 3814

Is it your own server?
Also what OS does it run?

Posted 6 years ago
Top
 
jmcguire
jmcguire
Posts: 552

It is my university's server, and it is a Linux server.

Posted 6 years ago
Top
 
jd2066
jd2066
Posts: 3814

Ok. You probably want to use Cron.
The syntax for it can very from one Linux distro to another. I can't really say what you need to do without knowing the Linux distro.
Also it can very weather you have permissions to use cron.
You should ask your University if you have permisson to use something like cron to schedule tasks.
Also ask what Linux distro they use if you don't know.
You may want to just ask them how to configure a task scheduling program like cron if they have tech support.

Posted 6 years ago
Top
 
jmcguire
jmcguire
Posts: 552

Thank you very much. We run Fedora Core 8 on client side, I am not sure about server side, but I believe it is Red Hat. Thank you very much for your help though. I will talk to the appropriate people.

Once again, thank you very much.

Posted 6 years ago
Top
 



Topic Closed

This topic has been closed to new replies.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!