SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this the right syntax for getting a cron job to run every 20 minutes?

    */20 * * * *

    ??

    Cheers

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Explanation of field values:

    * * * * * /home/user/domain-www/script_name

    1 2 3 4 5 path to script

    1 -- minute 00 - 59
    2 -- hour of day 00 - 23 (midnight is 00)
    3 -- day of month 01 - 31
    4 -- month of year 01 - 12
    5 -- day of week 01 - 07

    ------------------------------------------------------------------

    This will run the cron every 15 minutes:

    05,20,35,50 * * * * /home/user/domain-www/script_name

    1 2 3 4 5 path to script

    =>Note that you need double-digits if there is no * or /

    ------------------------------------------------------------------

    This will run the cron 4 times a day - midnight, 6AM, Noon, and 6PM:

    * 00,06,12,18 * * * /home/user/domain-www/script_name

    1 2 3 4 5 path to script
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes that is correct, ChilliBoy

  4. #4
    SitePoint Member
    Join Date
    Apr 2001
    Location
    Arizona
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can someone please explain to me what a cron job is? Thank you.

    Viper420

  5. #5
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers!

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Viper...

    Cron is a small Unix program that allows you to "schedule" the server to do specified things.

    These are usually things like:
    - Rotate images or content.
    -Take a "snapshot" of a dynamic page

    It's similar to the Windows Task Manager.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •