LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need help with setting up a cron (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-setting-up-a-cron-499565/)

juancha 11-07-2006 06:36 PM

need help with setting up a cron
 
Hi there

I'm very much a Linux newbie. I have a hosting account where I'm able to use cpanel which allows you to set up a cron within the cpanel web interface.

I've watched the flash tutorial the host has and I understand that you enter a Unix command to be run at intervals you specify. The thing being is that I was under the impression that you were able to specify a php script to run at certain intervals (as opposed to a command). This is what I want to do ......ie. run scripts that update my database etc.

Can anyone advise me further on how I would achieve this. eg is there a linux command that runs my php script.

Thanks


Juan.

hockeyman_102 11-07-2006 07:28 PM

edit your /etc/crontab file to run your php. You may have to google for help with it, but i have a perl file that pulls info into a mysql database for me every 10 seconds. You may have to put a sleep (1min or so) in your php and just let crontab run it.

chrism01 11-07-2006 07:28 PM

I believe means any cmd that is runnable at the Unix cmd line. So as long as you are using the cli version of php and specify the complete path to the cmd it should work, I think.


All times are GMT -5. The time now is 08:10 PM.