HowTo set cron job every 10 min?

Discussion in 'Installation/Configuration' started by Appie Thrasher, Jan 27, 2007.

  1. Appie Thrasher

    Appie Thrasher Member HowtoForge Supporter

    Okee I know I am way over my head in this. but here I go,

    I need to set a script to run every ten min. I have searched the forum and think to know that I must edit the
    Code:
    crontab -e
    output.

    Code:
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
    0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
    15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
    40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php &> /dev/null
    
    I think that the first 5 * are there to set the time. I know for instance that the webalizer is run at 4 o'clock. so 0 4 * * * is 4 o'clock.
    Maybey * * * 10 * is every ten min?
    Can someone explain the time settings so I will be able to run the script for that website.

    And is there any way to cheq if the cronjob is exucuted?

    TIA DaRKNeSS
     
  2. jnsc

    jnsc rotaredoM Moderator

  3. Appie Thrasher

    Appie Thrasher Member HowtoForge Supporter

    So if I am reading it corect the following wil result in running every 10 min.
    10,20,30,40,50,60 * * * *..................
     
  4. jnsc

    jnsc rotaredoM Moderator

    replace 60 with 0, but you can also try */10
     
  5. Appie Thrasher

    Appie Thrasher Member HowtoForge Supporter

    Okee installed my cronjob. Got no errors so I supose its installed corectly I must wait and see.

    BTW I used your's so I have put */10 * * * * path to script.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    That looks good. :)
     
  7. dksyte

    dksyte New Member

    Cron Sandbox

    Anyone involved with cron job scheduling might find this resource useful.
    Cron Sandbox at HxPI is an interactive webpage where you can play with crontab command strings.
    Enter your 'm h D M Dw' parameters and immediately see all the times cron would run your job in the coming days/weeks.
    Newcomers to cron job scheduling get a safe place to learn crontab commands and try examples from tutorials.
    System Administrators get a forward schedule to help manage system loading.
    www.hxpi.com/cron_sandbox.php
     

Share This Page