Black Rock Reporting Azure Function
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ClockifyApiIntegrationFunction.cs 980B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using Microsoft.Azure.Functions.Worker;
  3. using Microsoft.Extensions.Logging;
  4. namespace BlackRockReportFunction
  5. {
  6. public class ClockifyApiIntegrationFunction
  7. {
  8. private readonly ILogger _logger;
  9. public ClockifyApiIntegrationFunction(ILoggerFactory loggerFactory)
  10. {
  11. _logger = loggerFactory.CreateLogger<ClockifyApiIntegrationFunction>();
  12. }
  13. [Function("ClockifyApiIntegrationFunction")]
  14. public void Run([TimerTrigger("*/5 * * * * *")] MyInfo myTimer)
  15. {
  16. _logger.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
  17. }
  18. }
  19. public class MyInfo
  20. {
  21. public MyScheduleStatus ScheduleStatus { get; set; }
  22. public bool IsPastDue { get; set; }
  23. }
  24. public class MyScheduleStatus
  25. {
  26. public DateTime Last { get; set; }
  27. public DateTime Next { get; set; }
  28. public DateTime LastUpdated { get; set; }
  29. }
  30. }