Cronjob What does it mean ??

Discussion in 'Site & Server Administration' started by A.G, Aug 8, 2007.

  1. #1
    Hello,

    I know some site use what called Cronjob from their site cPanel , but what does it mean and what is used for ??

    do you know where I can find good tutorial explain cronjob ?

    thanks
     
    A.G, Aug 8, 2007 IP
  2. woods

    woods Peon

    Messages:
    228
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's used for scheduling tasks/programs (Like 'scheduled tasks' in Windows) to run at certain times etc. You can specify it to run every 6th hour, once a day, once a week, once a year if on the 3rd of july and it happens to be a friday etc.

    Just google for 'crontab tutorial'

    The syntax of cronjobs looks like this:
    * * * * * <what to do>
    1 2 3 4 5 6

    1 = minute
    2 = hour
    3 = day
    4 = month
    5 = weekday
    6 = what to do, for example run a program or php file. (example: 'php /home/user/generatesomething.php')

    I've never used cpanel actually, I'm guessing they have it much easier, so you don't have to do it manually. :)
     
    woods, Aug 8, 2007 IP
  3. A.G

    A.G Well-Known Member

    Messages:
    2,510
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    150
    #3
    thank you for help
    can I use cronjob to optimize mysql database on the cPanel every 8 hours so I don't have to optimize it manually ? if you have idea about that
     
    A.G, Aug 8, 2007 IP
  4. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #4
    cron jobs are used to do routine tasks, eg. Execute a php script every day at 2pm, instead of having to do it manually everyday.
     
    dcristo, Aug 8, 2007 IP
  5. LFG

    LFG Active Member

    Messages:
    96
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    50
    #5
    Anyone ever tried using a cronjob with oscommerce to download a daily packing list of all orders?

    It would save a lot of time if I was able to do this, though I suppose the coed involved would be quite complex - might have to pay someone to code it?
     
    LFG, Aug 19, 2007 IP