NodeBrain User Guide
Release 0.6.4 - April 2006

< Prev Table of Contents Next >

Appendix B. Cron Schedules

Schedules coded for the Unix system scheduling daemon, cron, can be easily translated into schedule conditions in the NodeBrain language.

 

 

Utility

Configuration File Format

crontab

minute hour mday month wday command

NodeBrain

define term on(~(time_expression):- command

Utility

Configuration File Entry Example

crontab

20 4 1-15 * * date >/tmp/date.out 2>&1

NodeBrain

define r1 on(~(m(4:20).d(1..15))):= date >/tmp/date.out 2>&1

 

 

 

Crontab Schedule Specification

NodeBrain Time Condition

minute

hour

mday

month

wday

 

0-59

0-23

1-31

1-12

0-6

<- Range of values

 

 

 

 

 

 

0

0

*

1-5

*

~(n(1..5))

10

*

*

*

*

~(m(10))

0

0

*

*

0

~(su)

20

4

1-15

*

*

~(m(4:20).d(1..15))

5

10

1,7,9

*

1

~(m(10:5).d(1,7,9).mo)

5

10,14

1,7,9

*

1

~(m(5).h(10,14).d(1,7,9).mo)

 

 

*         all legal values

x-y      all values from x to y

x,y,z    specified values

 

NodeBrain’s Equivalent Functions

NodeBrain Time Condition

m(?)

h(?)

d(?)

n(?)

su,mo,tu,we,th,sa

~(m(?).h(?).d(?).n(?).?)

Replace question marks “?” with value in cron columns, ignoring columns with “*” and string the functions together, left to right, separating with a period to form the NodeBrain time expression.  Numbers in the wday column are replaced with two-character day-of-week names.

 

 


Copyright © 2003-2006 The Boeing Company