I couldn't see a way to get the "timer trigger" triggered in the Data Factory pipeline so I just did what I was hoping to avoid.
I added an extra HTTPTrigger and the rest of my function code remained the same. I could then reference that HTTP Function Trigger in my Data Factory pipeline
I could then add a "recurring trigger" from the Data Factory/Data Studio/Manage page that triggered the new HTTP interface/trigger
HTTP TRIGGER
...
FunctionController controller=null;
...
@FunctionName("MyFnHTTPTrigger")
public HttpResponseMessage run(
@HttpTrigger(name = "req", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.FUNCTION) HttpRequestMessage<Optional<String>> request,
final ExecutionContext context) {
controller = new FunctionController();
try {
controller.execute(context);
} catch (Exception e) {
context.getLogger().logp(Level.WARNING, "MyFnHTTPTrigger", "run", e.getMessage());
}
TIMER TRIGGER
...
FunctionController controller=null;
...
@FunctionName("MyFnTimer")
public void run(
@TimerTrigger(name = "timerInfo", schedule = "0 */1 * * * *") String timerInfo,
final ExecutionContext context
) {
context.getLogger().info("Java Timer trigger function executed at: " + LocalDateTime.now());
controller = new FunctionController();
try {
controller.execute(context);
} catch (Exception e) {
context.getLogger().logp(Level.WARNING, "MyFnTimer", "run", e.getMessage());
}