Q:

What is cron syntax?

A:

Quick Answer

Cron syntax is a utility used in Solaris and Unix for running tasks at set times in the background. These tasks are usually based upon a pre-designated schedule. Cron syntax accepts the time, date and any commands to be run during that period.

Continue Reading

Full Answer

The basic Cron syntax has six fields to be defined. The syntax is set up like this: * * * * * command. The definition of each field is: (minute=0-59)(hour=0-23)(day of the month=1-31)(month of the year=1-12)(day of the week=1-7 starting with Monday)(command). Any field not filled does not factor in. An example command would be "30 18 * * 1,3,5 rm /home/user/tmp/*." The example purges tmp files from "/home/user/tmp" at 6:30pm on Monday, Wednesday and Friday. The enhanced version of Cron called nnCron incorporates an additional time factor for the year.

Learn more about Software

Related Questions

Explore