Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This can be compensated for by adding start and end clock. If no start/end clock is specified, the simulator makes the following assumption about the simulation period.

  • No time dependencies - simulate for 24 hours.
  • day attributes              - simulate for 1 week
  • date attributes             - simulate for 1 month
  • cron attributes             - simulate for 1 year
  • repeat attributes          - simulate for 1 year

Additionally if time base attributes like, time,today,cron have no minutes, then the simulator will use 1 hour resolution.

Here is an example of a text based suite definition that use a verify attribute, for which we want check our assumption about the dynamic behaviour.

Code Block
languagebash
titlecron.def
suite year            # use real clock otherwise the date wont change
 clock real 1.1.2017  # define a start date for deterministic simulation
 endclock   1.1.2018  # When to finish. A endclock is *ONLY* for use with the simulator.
 family cronFamily
  task t
   cron -d 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 -m 1,2,3,4,5,6,7,8,9,10,11,12 10:00 # run every day at 10am for a year
   verify complete:365 # verify that this task completes 365 times
 endfamily
endsuite

suite leap_year       # use real clock otherwise the date wont change
 clock real 1.1.2016  # define a start date for deterministic simulation 
 endclock   1.1.2017  # When to finish. A endclock is *ONLY* for use with the simulator.
 family cronFamily
  task t
   cron -d 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 -m 1,2,3,4,5,6,7,8,9,10,11,12 10:00  #  run every day at 10am for a year
   verify complete:366 # verify that this task completes 366 times in a leap year
 endfamily
endsuite

...