^1539830482795
@
sname
Task
slabel
Task
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p>APP定时任务，执行init方法后会保存到数据库中，保存后的参数和是否启动等可以通过数据库来管理了。</p>

<p><strong>需要重写的方法</strong></p>

<ul>
	<li><strong>void run()</strong><br />
	任务执行时会调用run方法，在run方法里编写任务的实现。</li>
</ul>

<p><strong>自动初始化</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果要加入到XWorker的应用初始化中，那么应注册到xworker.app.task.TaskInitIndex下，并设置group属性。</p>

<p>&nbsp;&nbsp;&nbsp; 如果App相关的定义任务已启动，那么会自动初始化。在初始化时如果数据库中记录已经存在，则不执行任何操作。</p>

<p><strong>任务的设置延迟</strong></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;需要注意的是，App任务的设置更新时通过刷新任务完成的，刷新任务本身也有时间间隔，这样任务在数据库设置后并不是立刻生效了，而是要等到下一个刷新周期。</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;新的任务需要两个周期才能真正启动，第一个周期里加入到数据库，第二个周期里应用设置。</p>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
  @/@actions
  sname
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  actions
    @/@actions/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.app.task.TaskActions
    smethodName
    init
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    init
    @/@actions/@run
    sname
    run
    sunimplementedException
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@NOOP
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    run
  @/@name
  sname
  name
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  name
  @/@label
  sname
  label
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  label
  @/@status
  sname
  status
  slabel
  生效
  sextends
  status
  sinputtype
  truefalse
  sshowLabel
  true
  sreadOnly
  false
  sdefault
  true
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  status
  @/@delay
  sname
  delay
  slabel
  启动后延迟
  sextends
  delay
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  delay
  @/@period
  sname
  period
  slabel
  周期
  sextends
  period
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  period
  @/@timeUnit
  sname
  timeUnit
  slabel
  时间单位
  sextends
  xworker.lang.task.Task/@TimeUnit
  sinputtype
  select
  sshowLabel
  true
  sreadOnly
  false
  sdefault
  MILLISECONDS
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  timeUnit
  @/@fixedRate
  sname
  fixedRate
  slabel
  固定频率
  sextends
  fixedRate
  sinputtype
  truefalse
  sshowLabel
  true
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  fixedRate
  @/@fixTime
  sname
  fixTime
  slabel
  定点运行
  sextends
  fixTime
  sinputtype
  truefalse
  sshowLabel
  true
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  fixTime
  @/@fixTimeStr
  sname
  fixTimeStr
  slabel
  定点运行字符串
  sextends
  fixTimeStr
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  fixTimeStr
  @/@executeCount
  sname
  executeCount
  slabel
  最大执行次数
  sextends
  executeCount
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  executeCount
  @/@calculatePassCount
  sname
  calculatePassCount
  slabel
  计算流失次数
  sextends
  calculatePassCount
  sinputtype
  truefalse
  sshowLabel
  true
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  calculatePassCount
  @/@description
  sname
  description
  sinputtype
  html
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  description
  @/@actions1
  sname
  actions
  slabel
  Actions
  sdescriptors
  xworker.lang.MetaDescriptor2/@thing
  sextends
  xworker.lang.actions.Actions
  smany
  true
  seditCols
  2
  Sdescription
#$@text#$@
<p>动作集合，通过子节点可以添加各种动作，动作通常是一个可执行的程序。</p>
<p>事物的第一个动作集合的子事物才可以作为事物的行为，第二个及其他动作集合就不能作为事物的行为使用了，事物的行为默认找第一个动作集合。</p>
<p>事物的run方法一般是这个事物转化为动作之后执行的方法。</p>
#$@text#$@
  szh_label
  动作
  sth_createIndex
  false
  sid
  actions1
    @/@actions1/@name
    sname
    name
    sdescriptors
    xworker.lang.MetaDescriptor2/@attribute
    sid
    name
