Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

javaCron

Browsing crontab.txt.sample (3.34 KB)

# This is an example crontab file (for javaCron)
#
# Each line of crontab.txt has the following structure:
# <Minute> <Hour> <Day> <Month> <Day of Week> <Command line>
#
# Position:    Values:
# Minute       0-59
# Hour         0-23
# Day          1-31
# Month        1-12 or use names
# Day of week  0-6 (0=Sunday, 1=Monday, ..., 6=Saturday) or use names
#
# Instead of minute, hour, day, month or day of week it's also possible to
# specify a *. A * represents all possible values for that position (e.g. a
# * on 2nd position is the same as specifying all the possible values for hour)
#
# Several values can be separated by commas: e.g. if a command is to #be
# executed every 10th minute so you can specify 0,10,20,30,40,50 for minute.
# A range of values can be specified with a -: e.g. value 0-12 for
# hour -> every hour a.m.
#
# A divider is specified by "/": */2 specified for minute means every second
# minute. 5-10/2 for hour matches every second hour from 5 to 10.
#
# line continuation character: " \" (not supported)
# please note: there has to be a space before "\". There's no character
# allowed after "\"
#
# a line starting with a "#" is a comment
#
# character '?':
# ... means "time of javaCron startup".
# Internally all the ? get replaced by the current time. So if you specify e.g.
# ? ? * * * command
# The command gets executed on startup of the javaCron service and then every day
# at the same time (if the computer is not turned off in between).
# If the cron service was started e.g. at 10:29 the command gets executed
# at 10:29 and at 10:29 the following days.
#
#------------------------------------------------------------------------------

# EXAMPLES

# execute a command every minute
* * * * * "c:\windows\notepad.exe" foo bar

# one command - two lines
* * * * * "c:\windows\notepad.exe" foo bar

# every hour
0 * * * * "c:\windows\notepad.exe" foo bar

# every day at 12.30 p.m.
30 12 * * * "c:\windows\notepad.exe" foo bar

# every monday at midnight
0 0 * * Monday "c:\windows\notepad.exe" foo bar

# on the 1st of every month at 2.45 p.m.
45 14 1 * * "c:\windows\notepad.exe" foo bar

# copy some files every half hour
0,30 * * * * "c:\winnt\system32\cmd.exe" /c xcopy c:\docs\*.* y:\users /s

# every ten minutes:
*/10 * * * * "c:\winnt\system32\cmd.exe" /c xcopy c:\docs\*.* y:\users /s

# copy a file with a long file name every hour (a.m.) only on weekdays
0 0-12 * * Mon-Fri "c:\winnt\system32\cmd.exe" /c copy "c:\important text file.txt" e:\

#------------------------------------------------------------------------------

# EXAMPLES for '?':

# start script only at javaCron startup
? ? ? ? ? "c:\windows\notepad.exe" 

# start script at service startup (e.g. at 10:29) and then every hour
# --> starts at 10:29, 11:29, 12:29, 13:29, ...
? * * * * "c:\windows\notepad.exe" 

# start script on startup and then on the same weekday javaCron was started
? ? * * ? "c:\windows\notepad.exe" 

#------------------------------------------------------------------------------

# EXAMPLES for Show Window commands:
#
# You can set the initial display state of the program by using the s: command
#
# s:0    HIDDEN
# s:1    NORMAL (default if omitted)
# s:2    MINIMIZED
# s:3    MAXIMIZED
#
# execute a command every minute and show the command HIDDEN
* * * * * s:0 "c:\windows\notepad.exe"

Download crontab.txt.sample

Back to file list


Back to project page