Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
set interval to 1 hour for realtime trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kurz committed Jan 30, 2024
1 parent 3037835 commit 1c0433d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
import io.redlink.more.studymanager.core.io.ActionParameter;
import io.redlink.more.studymanager.core.properties.ActionProperties;
import io.redlink.more.studymanager.core.sdk.MoreActionSDK;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PushNotificationAction extends Action<ActionProperties> {

private static final Logger LOGGER = LoggerFactory.getLogger(PushNotificationAction.class);

protected PushNotificationAction(MoreActionSDK sdk, ActionProperties properties) throws ConfigurationValidationException {
super(sdk, properties);
}

@Override
public void execute(ActionParameter parameters) {
LOGGER.info("send push notification with parameters: {}", parameters.toString());
sdk.sendPushNotification(
properties.getString("title"),
properties.getString("message")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected RelativeTimeTrigger(MoreTriggerSDK sdk, TriggerProperties properties)
}
@Override
public void activate() {
String schedule = sdk.addSchedule(new CronSchedule("1 * * * * ?"));
String schedule = sdk.addSchedule(new CronSchedule("1 0 * * * ?"));
sdk.setValue("scheduleId", schedule);
}

Expand Down

0 comments on commit 1c0433d

Please sign in to comment.