Class MCRCronjob

java.lang.Object
org.mycore.mcr.cronjob.MCRCronjob
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
MCRCommandCronJob

public abstract class MCRCronjob extends Object implements Runnable
MCRCronjobManager.JOBS_CONFIG_PREFIX and automatic executed. If you want to create your own MCRCronjob you should maybe look if MCRCommandCronJob is good enough. The Default properties for this Configurable are: cronType and setCron(String)
  • Field Details

    • cronType

      public String cronType
      The format type of the cron property. Default is Unix, other possible values are: CRON4J, QUARTZ, UNIX, SPRING
  • Constructor Details

    • MCRCronjob

      public MCRCronjob()
  • Method Details

    • getID

      public String getID()
    • setID

      public void setID(String id)
    • checkConfiguration

      public void checkConfiguration(String property)
    • getCron

      public com.cronutils.model.Cron getCron()
    • setCron

      public void setCron(String cron)
      Parameters:
      cron - The description when the Cronjob should be executed.
    • getNextExecution

      public Optional<Long> getNextExecution()
    • getCronDescription

      public String getCronDescription()
    • getProcessable

      public MCRAbstractProcessable getProcessable()
    • run

      public final void run()
      Specified by:
      run in interface Runnable
    • runJob

      public abstract void runJob()
      Will be executed according to the Cron schedule. Remember to call getProcessable() and update its values to let the user know what you are doing.
    • getDescription

      public abstract String getDescription()
      Returns:
      A Description what this Cronjob does.