{"id":19204347,"url":"https://github.com/jmbl1685/azure-functions-sql","last_synced_at":"2025-09-13T00:36:00.351Z","repository":{"id":134055904,"uuid":"145029174","full_name":"jmbl1685/azure-functions-sql","owner":"jmbl1685","description":"This sample uses Azure Functions (Timer Trigger)","archived":false,"fork":false,"pushed_at":"2018-08-16T22:51:40.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T13:42:09.014Z","etag":null,"topics":["azure-functions","csharp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmbl1685.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-16T19:13:31.000Z","updated_at":"2018-11-15T01:52:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbc4d5b9-5d77-409d-87ec-10711e8a0de7","html_url":"https://github.com/jmbl1685/azure-functions-sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmbl1685/azure-functions-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fazure-functions-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fazure-functions-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fazure-functions-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fazure-functions-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmbl1685","download_url":"https://codeload.github.com/jmbl1685/azure-functions-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fazure-functions-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274902218,"owners_count":25371074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-functions","csharp"],"created_at":"2024-11-09T13:07:30.895Z","updated_at":"2025-09-13T00:36:00.328Z","avatar_url":"https://github.com/jmbl1685.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Function (Timer Trigger)\n\nEl siguiente proceso es un ejemplo muy básico que corresponse a una Azure Function tipo TimerTrigger que se estará ejecutando cada 5 minutos\ny como caso de prueba hará incremento de 1 dia a la fecha correspondiente del campo LimitValidateAt si y solo si el esado sea 1 y las fechas coincidan con la actual.  \n\n```c#\n\n  // Formato de fecha CRON --\u003e \"0 */5 * * * *\" 5 MINUTOS\n\n [FunctionName(\"AddOneDayLimitValidateAt_Example\")]\n  public static async Task Run([TimerTrigger(\"0 */5 * * * *\")]TimerInfo myTimer, TraceWriter log)\n  {\n      var DBConnectionString = ConfigurationManager.\n          ConnectionStrings[\"sqlserver_azure\"].ConnectionString;\n\n      using (SqlConnection connection = new SqlConnection(DBConnectionString))\n      {\n          connection.Open();\n          var query = @\" \n              UPDATE [dbo].[Users] \n              SET LimitValidateAt = DATEADD(DAY, 1, LimitValidateAt)\n              WHERE CONCAT(YEAR(CreateAt),'-',MONTH(CreateAt)) = CONCAT(YEAR(GETDATE()), '-', MONTH(GETDATE()))\n              AND Status = 1\";\n\n          using(SqlCommand cmd = new SqlCommand(query, connection))\n          {\n              var rows = await cmd.ExecuteNonQueryAsync();\n              log.Info($\"{rows} rows has been updated\");\n          }\n      }             \n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Fazure-functions-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmbl1685%2Fazure-functions-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Fazure-functions-sql/lists"}