Results 1 to 4 of 4

Thread: command line or cron job ?

  1. #1
    SonnyCooL's Avatar
    SonnyCooL is offline HeeHa
    Join Date
    Jan 2010
    Location
    Melb/Malaysia
    Posts
    920
    Thanks
    250
    Thanked 92 Times in 78 Posts

    command line or cron job ?

    recently my web server acting weird, it keep on reset my cronjob script before script completed the task, my web hosting suggest me to use command line to start script then using cron job (webserver).

    So my question is, would that make huge different ??
    thanks

  2. #2
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,327 Times in 1,258 Posts
    I'm afraid that I do not understand the question. Perhaps try rephrasing it?

    On my own server, PHP scripts that are run from the web use one PHP configuration file and those that are run from the command line use a different PHP configuration file. /etc/php5/apache/php.ini vs. /etc/php5/cli/php.ini. Perhaps your host has configured different timeout values for different ways to interface with PHP?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  3. Thanked by:

    SonnyCooL (26 October, 2010)

  4. #3
    SonnyCooL's Avatar
    SonnyCooL is offline HeeHa
    Join Date
    Jan 2010
    Location
    Melb/Malaysia
    Posts
    920
    Thanks
    250
    Thanked 92 Times in 78 Posts
    Quote Originally Posted by Will.Spencer View Post
    I'm afraid that I do not understand the question. Perhaps try rephrasing it?

    On my own server, PHP scripts that are run from the web use one PHP configuration file and those that are run from the command line use a different PHP configuration file. /etc/php5/apache/php.ini vs. /etc/php5/cli/php.ini. Perhaps your host has configured different timeout values for different ways to interface with PHP?
    this is what i get from my hosting provider :
    I don't have strong knowledge in server/OS but i would like to know, doing like what they said will solve my current issue ...

    Code:
    Hi Sonny,
    
    I suggest you to run the SCRIPT as command line rather than calling it from the WebServer.
    Try this
    
    www.php-cli.com/php-cli-tutorial.shtml 
    
    Thanks

  5. #4
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,327 Times in 1,258 Posts
    I would give it a try if your script can be run from the command line.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  6. Thanked by:

    SonnyCooL (26 October, 2010)

Similar Threads

  1. Anyone still playing Command and Conquer games ?
    By StephenM in forum General Chat
    Replies: 1
    Last Post: 24 June, 2010, 21:17 PM
  2. COMMAND & CONQUER 3 TIBERIUM WARS
    By chatterbox in forum Gaming
    Replies: 5
    Last Post: 7 January, 2010, 07:17 AM
  3. Unix command for making files
    By Mr.Bill in forum Managing
    Replies: 2
    Last Post: 31 July, 2009, 11:37 AM
  4. Database Backup (to Email and FTP) via Cron
    By Zash in forum Programming
    Replies: 9
    Last Post: 6 July, 2009, 04:28 AM
  5. Invalid command 'RewriteEngine'
    By smokeyjoe in forum Translation Script Support
    Replies: 2
    Last Post: 22 December, 2008, 13:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •