Restricting Scheduler to run in published Env.
I want to restrict the scheduler to run in published env. which approach will be good for this?
I want to restrict the scheduler to run in published env. which approach will be good for this?
In the run() of scheduler you have to runmode wheather its autour or publisher
@Reference
private SlingSettingsService settingsService;
private Set<String> runModes;
@Override
public void run() {
this.runModes = settingsService.getRunModes();
if (null != runModes && runModes.contains("author")) {
//your code goes here...
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.