У кого-нибудь есть пример реализации Spring Cloud Function [Azure] TimerTrigger? Пожалуйста, поделитесь
Это образец httptrigger:
https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-adapters/spring-cloud-function-adapter-azure
вы можете заменить httptrigger на timetrigger:
@FunctionName("TimerTriggerJava1") public void run( @TimerTrigger(name = "timerInfo", schedule = "0 */5 * * * *") String timerInfo, final ExecutionContext context ) { context.getLogger().info("Java Timer trigger function executed at: " + LocalDateTime.now()); }
Это вам нужно импортировать:
import java.time.*; import com.microsoft.azure.functions.annotation.*; import com.microsoft.azure.functions.*;