Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 4 of 4

This is a discussion on Help with a cron job please! in the Shared & Semi-Dedicated forum
Hi, I was reading some threads on how to setup a cron job, but still could not get it work. There is no errors on ...

  1. #1
    JPC Senior Member
    Join Date
    Mar 2004
    Posts
    69

    Talking Help with a cron job please!

    Hi,

    I was reading some threads on how to setup a cron job, but still could not get it work.

    There is no errors on my script. I could execute it from my browser. The result would send me an email.

    I had it set up as the following:

    every other hour, i will execute a php file


    [0] [*/2][*][*][*] (without the brackets)

    /home/myusername/sqlmonitor/sqlmonitor.php > /home/myusername/sqlmonitor/log.txt

    Is the setup wrong?

    Thank you!

  2. #2
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    If your php script is a cli based, then there should be no problem. However if your script is regular php script for web and you can run it from the web, then you may need to call it using php like this:

    php -q /home/myusername/sqlmonitor/sqlmonitor.php

    where php is the cli binary.

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  3. #3
    JPC Senior Member
    Join Date
    Mar 2004
    Posts
    69
    Quick response!
    Thank you! it works perfectly now. My script is a regular php.
    masood, You've saved me lots of time.

  4. #4
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Glad to be of help

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

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
  •