On Tue, Aug 19, 2008 at 12:29 AM, Hendra Susanto wrote:

> Dear Phill and Billy,
>
>
> Thanks a lot for the help.. but i never have any experience with UNIX. I
> just learnt cron just to get my PHP code run at a scheduled time. So
> basically i have no idea the specific detail about the cron command.
> Attach
> I have another webhost at HostGator, and for the cron, i simply use:
>
> **/1 * * * ** *php /home/apple/public_html/call/welcome.php*
>
> and it works perfectly as i expected.
> Notes: username = apple
>            url address = www.gol168.com/call/welcome.php
>
> But i want to move my hosting to the new one GoDaddy. I have attached the
> cron requirement for Godaddy webhosting and I have tried using:
>
> *php /home/apple/public_html/download/call/welcome.php
>
> /usr/local/bin/php /home/**apple*
> */public_html/download/call/welcome.php
>
> /web/cgi-bin/php5 /home/**apple**/public_html/download/call/welcome.php
>
> /web/cgi-bin/php /home/**apple**/public_html/download/call/welcome.php
>
> /web/cgi-bin/php5 /home/**apple**/html/download/call/welcome.php
>
> /web/cgi-bin/php /home/**apple**/html/download/call/welcome.php*
>
> But none of them seems to be working.
> Notes: username = apple
>            url address = www.t2gm.net/download/call/welcome.php
>
>
>
>
> On Mon, Aug 18, 2008 at 11:30 PM, Phill Sparks <
> [EMAIL PROTECTED]> wrote:
>
>>   Hi Billy,
>>
>>
>> On Mon, Aug 18, 2008 at 5:20 PM, William Piper <[EMAIL 
>> PROTECTED]<billy%40kersting.com>>
>> wrote:
>> > Go to the directory that has welcome.php and type "pwd". Verify that you
>> > are entering exactly the correct directory. I don't believe that cron
>> > will work with symbiotic links.
>>
>> I believe that the only issues with symlinks are not relevant here
>> since Hendra is working with a user crontab rather than the system
>> cron.* directories. Still could be worth checking though :-)
>>
>> > Also, I believe you need to add a user to run the cron.
>>
>> When setting up a user cron (via `crontab -e`) you can only run cron
>> jobs as your own user so specifying a user is not valid. You're right
>> that for the system crontab you are required to specify a username.
>>
>> Phill
>>  
>>
>
>
------------------------------
YES... Finally, i got it to work:
/web/cgi-bin/php5 $HOME/html/download/call/welcome.php

Since Godaddy only allow hourly schedule task, i guess the only work around
to have it running every minute is to follow Ferdhie suggestion:

set_time_limit(0);
while( true ) {
    do_your_stuff();
    sleep(60); // 60 seconds
}

Thanks for all the help.

Reply via email to