[ 
https://issues.apache.org/jira/browse/SLING-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795440#comment-13795440
 ] 

Carsten Ziegeler commented on SLING-3172:
-----------------------------------------

A scheduled job does not get a job id, the first job executed from this 
schedule gets an id, the second job executed by the schedule gets a different 
id - so I don't think using the job id is a good way.
I agree that the name is not useful in all cases and that's its sometimes 
problematic to generate a unique name. A nearly unique value for scheduled job 
is the job topic, it's most unlikely to have more than one schedule for the 
same topic - so this can be used as well

[[email protected]] WDYT about dropping the schedule name completely - as 
we now use the builder/fluent api we can add it later on as an option if really 
required

> Job schedule name handling
> --------------------------
>
>                 Key: SLING-3172
>                 URL: https://issues.apache.org/jira/browse/SLING-3172
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: Extensions Event 3.3.0
>
>
> follow-up from SLING-3028
> Q: JobBuilder.schedule - for what is the parameter "name" used? i does not 
> get its meaning from the javadocs. why is it required to make it unique?
> A: Schedule Name: each schedule gets a unique name to identify it and have a 
> way to update the schedule or unschedule it. The other option I see would be 
> to create a unique scheduling id when a new schedule is created and then use 
> this to reference it. But in that case the client needs to store this id 
> somewhere. If you think that this needs further enhancements or changes, 
> please open a separate ticket.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to