Annotation Type ScheduledTask


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Documented
    public @interface ScheduledTask
    Register any class implementing Task as a task to be scheduled
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String cron
      A cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week.
      java.lang.String name  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean cluster
      If true the job will only run once in the Alfresco cluster by using the JobLockService
      java.lang.String cronProp
      A key to a property from alfresco-global.properties specifying a cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week.
      java.lang.String group  
    • Element Detail

      • cron

        java.lang.String cron
        A cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week. e.g. "0 * * * * MON-FRI" means once per minute on weekdays (at the top of the minute - the 0th second).
        Returns:
        an expression that can be parsed to a cron schedule
      • name

        java.lang.String name
        Returns:
        the unique name of the task
      • group

        java.lang.String group
        Returns:
        the job group name, defaults to "DEFAULT"
        Default:
        "DEFAULT"
      • cronProp

        java.lang.String cronProp
        A key to a property from alfresco-global.properties specifying a cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week. e.g. "0 * * * * MON-FRI" means once per minute on weekdays (at the top of the minute - the 0th second).
        Returns:
        an expression that can be parsed to a cron schedule. When not provided / not resolved, fallback to default cron expression.
        Default:
        ""
      • cluster

        boolean cluster
        If true the job will only run once in the Alfresco cluster by using the JobLockService
        Default:
        false