Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-8165

Documentation Request for information about scheduled jobs (using both MEMORY_CLUSTERED and PERSISTED storage types)

    Details

    • Type: New Article
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 7.1.x, 7.2.x
    • Component/s: Core Infrastructure
    • Labels:
      None
    • Type of Documentation:
      Developer

      Description

      Requested by Isaac Wilson via LRSUPPORT-38325:

      Description

      The purpose of this ticket is to request official documentation (or a full knowledge base article, longer than a KCS article) that discusses PERSISTED scheduled jobs. Generally speaking, we have a handful of very brief articles that reference scheduled jobs and note specific actions that need to be taken for them, (see article 1article 2article 3article 4, etc.), but we do not have consolidated documentation describing scheduled jobs (and their requisites/limitations when used in Liferay) that would assist clients in being able to design ones themselves.

      Though designing custom scheduled jobs would be outside the realm of Support, Liferay has scheduled jobs built-in that could be described within the documentation, which customers could then use as an example for designing their own. Some additional comments were added to the 7.2 and 7.1 Quartz properties, see LPS-99378 (which roughly provide some examples of the types of information this documentation would be created for), but ideally the published version of this documentation could also be applied to 7.0 as well, where those portal property comments have not been added to my knowledge.

      Specifically, the use case not covered by our existing documentation (reported on a Help Center ticket) that led to this request is for a client who was trying to create a custom (Quartz) scheduled job that used the STORAGE_TYPE=PERSISTED instead of STORAGE_TYPE=MEMORY_CLUSTERED storage type, but have it still work in a clustered environment.

      Research and Analysis

      There are a handful of blog posts out there that discuss scheduled jobs in more details, though none of them quite include all the requirements that a client would need to just know about (or be able to pore through our code to learn) in order to use the STORAGE_TYPE=PERSISTED storage type for a job in a clustered environment. The primary posts I've found are:

      • This blog post by Minhchau, which is the closest in my opinion to what I'd be envisioning for a Knowledge Base article (though much more detailed than what we'll likely want to publish)
      • This blog post by Surekha Technologies (which theoretically contains how to make a PERSISTED job, but does not meet all of Liferay's requirements, see the "resolution" portion below), and
      • This blog post (that includes info on specifying the storage type)

      The following examples of STORAGE_TYPE.PERSISTED can be seen in OOTB functionality:

      However, for this particular client's use case/issue, reaching a resolution was twofold:

      1. The way the properties for scheduled jobs are handled was changed between 6.0 and 6.1, but it is difficult to find information about these changes, so the properties the client needed to use were different than those from their previous 6.0 environment; and
      2. Based on the LPS-115394 investigation and conclusions, it was determined that it would also be required that they have a method to define and schedule it (such as a UI menu), which means that the job would be invoked manually (using schedule/unschedule/delete/pause/resume), instead of automatically using the message listener service API that would be used for a MEMORY_CLUSTERED job (I cannot find this documented anywhere).

      Request

      As such, I'd request that the created documentation would include:

      1. Basic information about quartz scheduled jobs in Liferay and the properties used to control them (including in a cluster), and
      2. Information about examples in core code of both a MEMORY_CLUSTERED and a PERSISTED job.
      3. Alternately, there are various POCs for scheduled jobs that have been created in the past (such as this Blade Sample). If it would be simpler than creating documentation, I am wondering whether we could instead explore the possibility of creating another sample that uses the PERSISTED storage type (in a cluster), and we could just make a KCS-style article that points to the sample in place of a full article.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              james.hinkey James Hinkey
              Reporter:
              jay.lee Jay Lee
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support

                    Packages

                    Version Package
                    7.1.x
                    7.2.x