About Linux FAQ

Browse More FAQs:

Run crontab Every 10 Minutes

Posted by Vivek Gite [Last updated: March 6, 2008]

Q. How do I run a cron job or a shell script every 10 minutes using Linux / UNIX cron service?

A. cron is a time-based scheduling service in Linux / Unix-like computer operating systems.

Login to UNIX system

Type the following command to enter cronjob:
$ crontab -e
Each cronjob has following syntax:

# +---------------- minute (0 - 59)
# |  +------------- hour (0 - 23)
# |  |  +---------- day of month (1 - 31)
# |  |  |  +------- month (1 - 12)
# |  |  |  |  +---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
  *  *  *  *  *  command to be executed

To get crontab to run a task every 10 minutes you could type as follow
*/10 * * * * /path/to/command
Save and close the file.

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. rockie Says:

    */10 * * * * /home/test.sh > /dev/null 2>&1
    crontab: error on previous line; unexpected character found in line.
    crontab: errors detected in input, no crontab file generated.

    Guess it does not work in Solaris 8

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.