Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie questions about cron and php script on Linux server
23-03-2008, 04:09 PM
Post: #1
Newbie questions about cron and php script on Linux server
I'm trying to set up a php script that runs via crontab on a Linux server. I've never done anything like this before. If you can offer any help, please provide as much detail as you can. Thank you for taking the time to read this...


My questions:

1) I want the crontab to run the script everyday from 3:58 PM to 4:13 PM EST. How is that written in crontab?

2) The command I want crontab to run is: php -q /path/to/script.php
According to that path name, where do I put the php script on my server? Do I have to create a folder named "path" with a folder named "to" in it, and put "script.php" in that folder?


Thanks!



More about question #1...

I can access my server through Cpanel (Hostgator). In Cpanel they provide two ways to enter a crontab. Here are screenshots showing both of those Cron Managers:
http://www.iov.in/cpanelcronmanagers.jpg


Because I want crontab to run the php script from 3:58 pm EST until 4:13 pm EST, I'm wondering how I am going to be able to enter that into either Cron Managers that Hostgator provides. There doesn't seem to be a way to enter a crontab so it starts 2 minutes before one hour (3 pm) and runs until 13 minutes after the next hour (4 pm).

Once someone does help me with the way the cronjob needs to be written, any ideas on how I enter that code into either one of the Cpanel Cron Managers? If I have to upload the crontab code to the server without using CPanel, how do I do that?



Thank you!
Send this user an email Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: