Class TaskerProp

  • All Implemented Interfaces:

    
    public class TaskerProp
    
                        

    TinyTask Config, A taskerBean can have only one

    Since:

    2022-12-09

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      TaskerProp()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean notTaskerApps()
      boolean notTaskerRuns()
      boolean notNoticeBean()
      boolean notNoticeWhen()
      boolean notNoticeConf()
      boolean notTimingZone()
      boolean notTimingType()
      boolean hasTimingCron()
      boolean hasTimingIdle()
      boolean hasTimingRate()
      boolean notTimingPlan() Whether no hasTimingCron, hasTimingIdle or hasTimingRate
      boolean notResultKeep()
      boolean isEnabled() whether to register and execute, not use Default config.
      boolean isAutorun() whether to auto register and start, not use Default config.
      int getVersion() version number, higher version config overrides lower one, not use Default config.
      String getTaskerBean() Beans annotated by TinyTasker, formatted as Class#method, automatically recognized by default, not use Default config.
      String getTaskerPara() Parameters of the task, object array in json format, default null or no parameters, not use Default config.
      String getTaskerName() Task name, used for notice and log, better readability, default is `[shortClassName#method]`, not use Default config.
      boolean isTaskerFast() Whether it is a light task, fast execution, completed in seconds, not use Default config.
      String getTaskerApps() The app it belongs to, comma separated, use Default config if null or empty.
      String getTaskerRuns() RunMode(product|test|develop|local), Comma separated, ignore case, default all, use Default config if null or empty.
      String getNoticeBean() Notice bean, SmallNotice type, fullpath of Class, no notice by default.
      String getNoticeWhen()
      Timing of notice, exec|fail|done|feed, comma separated ignoring case, default fail.
      use Default config if null or empty.
      
      * timing is roughly expressed: exec;try{run...;done}catch{fail}
      * exec - init task; done - success; fail - failed; feed - non-empty return.
      
      String getNoticeConf() The config name of the notice bean, automatic by default.
      String getTimingZone() timezone of scheduling , default system timezone, use Default config if null or empty.
      String getTimingType() scheduling expression type, affects how timingCron is parsed, defaults to spring cron format, use Default config if null or empty.
      String getTimingCron() Scheduling expression content, highest priority, affected by timingType, default spring cron format (second minute hour day month week), not use Default config.
      int getTimingIdle() Fixed idle interval (seconds), lower priority than timingCron, equal to fixedDelay, end to start, 0 means disable, not use Default config.
      int getTimingRate() Fixed frequency interval (seconds), lower priority than timingIdle, equal to fixedRate, start to start, 0 means disable, not use Default config.
      int getTimingMiss() Within how many seconds of a misfire, execution is required, 0 means no execution.
      int getTimingBeat() the interval seconds of heartbeat, if the task's last_exec is more than 2 heartbeats away from now, it is considered as an exception.
      String getDuringFrom() schedule start datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.
      String getDuringStop() schedule stop datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.
      int getDuringExec() stop schedule after how many total executions, not use Default config.
      int getDuringFail() stop schedule after how many consecutive failures, not use Default config.
      int getDuringDone() stop schedule after how many successful executions, not use Default config.
      int getDuringBoot() recount each time the app is started, and stop schedule after how many successful executions, disable by default, not use Default config.
      int getResultKeep() how many days to save the execution results, default 60 days, 0 means not save, use Default configuration if null.
      void setEnabled(boolean enabled) whether to register and execute, not use Default config.
      void setAutorun(boolean autorun) whether to auto register and start, not use Default config.
      void setVersion(int version) version number, higher version config overrides lower one, not use Default config.
      void setTaskerBean(String taskerBean) Beans annotated by TinyTasker, formatted as Class#method, automatically recognized by default, not use Default config.
      void setTaskerPara(String taskerPara) Parameters of the task, object array in json format, default null or no parameters, not use Default config.
      void setTaskerName(String taskerName) Task name, used for notice and log, better readability, default is `[shortClassName#method]`, not use Default config.
      void setTaskerFast(boolean taskerFast) Whether it is a light task, fast execution, completed in seconds, not use Default config.
      void setTaskerApps(String taskerApps) The app it belongs to, comma separated, use Default config if null or empty.
      void setTaskerRuns(String taskerRuns) RunMode(product|test|develop|local), Comma separated, ignore case, default all, use Default config if null or empty.
      void setNoticeBean(String noticeBean) Notice bean, SmallNotice type, fullpath of Class, no notice by default.
      void setNoticeWhen(String noticeWhen)
      Timing of notice, exec|fail|done|feed, comma separated ignoring case, default fail.
      use Default config if null or empty.
      
      * timing is roughly expressed: exec;try{run...;done}catch{fail}
      * exec - init task; done - success; fail - failed; feed - non-empty return.
      
      void setNoticeConf(String noticeConf) The config name of the notice bean, automatic by default.
      void setTimingZone(String timingZone) timezone of scheduling , default system timezone, use Default config if null or empty.
      void setTimingType(String timingType) scheduling expression type, affects how timingCron is parsed, defaults to spring cron format, use Default config if null or empty.
      void setTimingCron(String timingCron) Scheduling expression content, highest priority, affected by timingType, default spring cron format (second minute hour day month week), not use Default config.
      void setTimingIdle(int timingIdle) Fixed idle interval (seconds), lower priority than timingCron, equal to fixedDelay, end to start, 0 means disable, not use Default config.
      void setTimingRate(int timingRate) Fixed frequency interval (seconds), lower priority than timingIdle, equal to fixedRate, start to start, 0 means disable, not use Default config.
      void setTimingMiss(int timingMiss) Within how many seconds of a misfire, execution is required, 0 means no execution.
      void setTimingBeat(int timingBeat) the interval seconds of heartbeat, if the task's last_exec is more than 2 heartbeats away from now, it is considered as an exception.
      void setDuringFrom(String duringFrom) schedule start datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.
      void setDuringStop(String duringStop) schedule stop datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.
      void setDuringExec(int duringExec) stop schedule after how many total executions, not use Default config.
      void setDuringFail(int duringFail) stop schedule after how many consecutive failures, not use Default config.
      void setDuringDone(int duringDone) stop schedule after how many successful executions, not use Default config.
      void setDuringBoot(int duringBoot) recount each time the app is started, and stop schedule after how many successful executions, disable by default, not use Default config.
      void setResultKeep(int resultKeep) how many days to save the execution results, default 60 days, 0 means not save, use Default configuration if null.
      boolean equals(Object o)
      int hashCode()
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TaskerProp

        TaskerProp()
    • Method Detail

      • notTimingPlan

         boolean notTimingPlan()

        Whether no hasTimingCron, hasTimingIdle or hasTimingRate

      • isEnabled

         boolean isEnabled()

        whether to register and execute, not use Default config.

      • isAutorun

         boolean isAutorun()

        whether to auto register and start, not use Default config.

      • getVersion

         int getVersion()

        version number, higher version config overrides lower one, not use Default config.

      • getTaskerBean

         String getTaskerBean()

        Beans annotated by TinyTasker, formatted as Class#method, automatically recognized by default, not use Default config.

      • getTaskerPara

         String getTaskerPara()

        Parameters of the task, object array in json format, default null or no parameters, not use Default config.

      • getTaskerName

         String getTaskerName()

        Task name, used for notice and log, better readability, default is `[shortClassName#method]`, not use Default config.

      • isTaskerFast

         boolean isTaskerFast()

        Whether it is a light task, fast execution, completed in seconds, not use Default config.

      • getTaskerApps

         String getTaskerApps()

        The app it belongs to, comma separated, use Default config if null or empty.

      • getTaskerRuns

         String getTaskerRuns()

        RunMode(product|test|develop|local), Comma separated, ignore case, default all, use Default config if null or empty.

      • getNoticeBean

         String getNoticeBean()

        Notice bean, SmallNotice type, fullpath of Class, no notice by default. use Default config if null or empty.

      • getNoticeWhen

         String getNoticeWhen()
        Timing of notice, exec|fail|done|feed, comma separated ignoring case, default fail.
        use Default config if null or empty.
        
        * timing is roughly expressed: exec;try{run...;done}catch{fail}
        * exec - init task; done - success; fail - failed; feed - non-empty return.
        
      • getNoticeConf

         String getNoticeConf()

        The config name of the notice bean, automatic by default. use Default config if empty.

      • getTimingZone

         String getTimingZone()

        timezone of scheduling , default system timezone, use Default config if null or empty.

      • getTimingType

         String getTimingType()

        scheduling expression type, affects how timingCron is parsed, defaults to spring cron format, use Default config if null or empty.

      • getTimingCron

         String getTimingCron()

        Scheduling expression content, highest priority, affected by timingType, default spring cron format (second minute hour day month week), not use Default config.

      • getTimingIdle

         int getTimingIdle()

        Fixed idle interval (seconds), lower priority than timingCron, equal to fixedDelay, end to start, 0 means disable, not use Default config.

      • getTimingRate

         int getTimingRate()

        Fixed frequency interval (seconds), lower priority than timingIdle, equal to fixedRate, start to start, 0 means disable, not use Default config.

      • getTimingMiss

         int getTimingMiss()

        Within how many seconds of a misfire, execution is required, 0 means no execution. not use Default config.

      • getTimingBeat

         int getTimingBeat()

        the interval seconds of heartbeat, if the task's last_exec is more than 2 heartbeats away from now, it is considered as an exception. default auto to take rate or idle maximum, cron needs to specify it by itself, not use Default config.

      • getDuringFrom

         String getDuringFrom()

        schedule start datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.

      • getDuringStop

         String getDuringStop()

        schedule stop datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.

      • getDuringExec

         int getDuringExec()

        stop schedule after how many total executions, not use Default config.

      • getDuringFail

         int getDuringFail()

        stop schedule after how many consecutive failures, not use Default config.

      • getDuringDone

         int getDuringDone()

        stop schedule after how many successful executions, not use Default config.

      • getDuringBoot

         int getDuringBoot()

        recount each time the app is started, and stop schedule after how many successful executions, disable by default, not use Default config.

      • getResultKeep

         int getResultKeep()

        how many days to save the execution results, default 60 days, 0 means not save, use Default configuration if null.

      • setEnabled

         void setEnabled(boolean enabled)

        whether to register and execute, not use Default config.

      • setAutorun

         void setAutorun(boolean autorun)

        whether to auto register and start, not use Default config.

      • setVersion

         void setVersion(int version)

        version number, higher version config overrides lower one, not use Default config.

      • setTaskerBean

         void setTaskerBean(String taskerBean)

        Beans annotated by TinyTasker, formatted as Class#method, automatically recognized by default, not use Default config.

      • setTaskerPara

         void setTaskerPara(String taskerPara)

        Parameters of the task, object array in json format, default null or no parameters, not use Default config.

      • setTaskerName

         void setTaskerName(String taskerName)

        Task name, used for notice and log, better readability, default is `[shortClassName#method]`, not use Default config.

      • setTaskerFast

         void setTaskerFast(boolean taskerFast)

        Whether it is a light task, fast execution, completed in seconds, not use Default config.

      • setTaskerApps

         void setTaskerApps(String taskerApps)

        The app it belongs to, comma separated, use Default config if null or empty.

      • setTaskerRuns

         void setTaskerRuns(String taskerRuns)

        RunMode(product|test|develop|local), Comma separated, ignore case, default all, use Default config if null or empty.

      • setNoticeBean

         void setNoticeBean(String noticeBean)

        Notice bean, SmallNotice type, fullpath of Class, no notice by default. use Default config if null or empty.

      • setNoticeWhen

         void setNoticeWhen(String noticeWhen)
        Timing of notice, exec|fail|done|feed, comma separated ignoring case, default fail.
        use Default config if null or empty.
        
        * timing is roughly expressed: exec;try{run...;done}catch{fail}
        * exec - init task; done - success; fail - failed; feed - non-empty return.
        
      • setNoticeConf

         void setNoticeConf(String noticeConf)

        The config name of the notice bean, automatic by default. use Default config if empty.

      • setTimingZone

         void setTimingZone(String timingZone)

        timezone of scheduling , default system timezone, use Default config if null or empty.

      • setTimingType

         void setTimingType(String timingType)

        scheduling expression type, affects how timingCron is parsed, defaults to spring cron format, use Default config if null or empty.

      • setTimingCron

         void setTimingCron(String timingCron)

        Scheduling expression content, highest priority, affected by timingType, default spring cron format (second minute hour day month week), not use Default config.

      • setTimingIdle

         void setTimingIdle(int timingIdle)

        Fixed idle interval (seconds), lower priority than timingCron, equal to fixedDelay, end to start, 0 means disable, not use Default config.

      • setTimingRate

         void setTimingRate(int timingRate)

        Fixed frequency interval (seconds), lower priority than timingIdle, equal to fixedRate, start to start, 0 means disable, not use Default config.

      • setTimingMiss

         void setTimingMiss(int timingMiss)

        Within how many seconds of a misfire, execution is required, 0 means no execution. not use Default config.

      • setTimingBeat

         void setTimingBeat(int timingBeat)

        the interval seconds of heartbeat, if the task's last_exec is more than 2 heartbeats away from now, it is considered as an exception. default auto to take rate or idle maximum, cron needs to specify it by itself, not use Default config.

      • setDuringFrom

         void setDuringFrom(String duringFrom)

        schedule start datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.

      • setDuringStop

         void setDuringStop(String duringStop)

        schedule stop datetime at timingZone, in yyyy-MM-dd HH:mm:ss format, 0 means disable, not use Default config.

      • setDuringExec

         void setDuringExec(int duringExec)

        stop schedule after how many total executions, not use Default config.

      • setDuringFail

         void setDuringFail(int duringFail)

        stop schedule after how many consecutive failures, not use Default config.

      • setDuringDone

         void setDuringDone(int duringDone)

        stop schedule after how many successful executions, not use Default config.

      • setDuringBoot

         void setDuringBoot(int duringBoot)

        recount each time the app is started, and stop schedule after how many successful executions, disable by default, not use Default config.

      • setResultKeep

         void setResultKeep(int resultKeep)

        how many days to save the execution results, default 60 days, 0 means not save, use Default configuration if null.