@manhng

Welcome to my blog!

Cron Jobs

October 29, 2021 16:30

Cron Jobs (edit)

Crontab.guru - The cron schedule expression editor (HAY HAY HAY)

How to run cron job every day in ASP.NET Core Application?

Creating a Quartz.NET hosted service with ASP.NET Core (andrewlock.net)

Hangfire – Background jobs and workers for .NET and .NET Core

Quartz.NET (quartz-scheduler.net)

dotnet-labs/ServiceWorkerCronJob: Schedule Cron Jobs using HostedService in ASP.NET Core (github.com)

Schedule Cron Jobs using HostedService in ASP.NET Core | by Changhui Xu | codeburst (HAY HAY HAY)

NuGet Gallery | Cronos 0.7.1 (HAY HAY HAY)

Releases · HangfireIO/Cronos (github.com) (HAY HAY HAY)

Schedule Background Jobs Using Hangfire in .NET Core | by Changhui Xu | codeburst (HAY HAY HAY)

HangfireIO/Cronos: Fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions (github.com)

HangfireIO/Cronos: Fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions (github.com)

Cronos

Cron job troubleshooting guide

Schedule Cron Jobs using HostedService in ASP.NET Core (HAY HAY HAY)

Cron - Wikipedia

Một vài ghi chú về Cron Job (dotnetcoban.com)

  • .NET 5.0
  • Using System.Timers.Timer
  • Using TimeZone: Japan Standard Time (JST) is 9 hours ahead of Coordinated Universal Time (UTC)
    • TimeZone: UTC+09:00
    • Default Culture = "ja-JP"
    • For sending the Email with ja-JP
    • Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ja-JP");
    • Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ja-JP");
  • Cronos version 0.7.1
  • AddSingleton...
  • AddHostedService...

Nuget: Cronos

Version: 0.7.1

        /// <summary>
        /// Crontab First Day of Every Month
        /// https://crontab.tech/first-Day-of-Month
        /// Crontab run at 12:00 AM of First Day of Every Month:
        ///  0 0 1 * * /path/to/your/script-or-program
        /// -------------------------------------------
        /// Crontab run at 12:30 AM of First Day of Every Month:
        /// 30 0 1 * * /path/to/your/script-or-program
        /// -------------------------------------------
        /// Crontab run at 01:00 AM of First Day of Every Month:
        ///  0 1 1 * * /path/to/your/script-or-program
        /// -------------------------------------------
        /// Crontab run at 01:30 AM of First Day of Every Month:
        /// 30 1 1 * * /path/to/your/script-or-program
        /// </summary>
        /// <param name="time"></param>
        /// <returns></returns>
        protected static string GetCronExpression(string time)
        {
            if (string.IsNullOrEmpty(time)) return "";
            var arr = time.Split(':', StringSplitOptions.RemoveEmptyEntries);
 
            if (int.TryParse(arr[0], out int hour) && int.TryParse(arr.Length > 1 ? arr[1] : "0"out int minute))
            {
                return $"{minute} {hour} * * *";
            }
 
            return "";
        }

Cronos

Cronos là một bộ phim chính kịch kinh dị độc lập của Mexico năm 1993 do Guillermo del Toro viết kịch bản và đạo diễn với sự tham gia của Federico Luppi và Ron Perlman. Cronos là phim truyện đầu tiên của del Toro, và là phim đầu tiên trong số nhiều phim mà ông đã làm việc với Luppi và Perlman.

Chronos: Vị Thần Thời Gian Của Hy Lạp Và Thế Giới Đồng Hồ

Cronus

Cronus (tiếng Hy Lạp: Κρόνος; còn gọi Kronos)  một vị thần trong thần thoại Hy Lạp. Thần  con út của Uranus và Gaia, và  một trong 12 Titan. Vị thần Saturn trong thần thoại La Mã được coi  tương đương với Cronus.

Saturnus fig274.png

Scheduled Tasks In ASP.NET

January 9, 2019 09:55

Scheduled Tasks In ASP.NET (edit)

  • Hangfire
  • Quartz.Net
  • Windows Services

Azure Scheduler

https://docs.microsoft.com/en-us/azure/scheduler/scheduler-intro

Background tasks with hosted services in ASP.NET Core

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-2.2

Background tasks in ASP.NET Core

https://samueleresca.net/2017/12/background-tasks-in-asp-net-core/

Run Background Task In Web Apps Using QueueBackgroundWorkItem

https://www.c-sharpcorner.com/article/run-background-task-using-hostingenvironment-queuebackgroundworkitem-net-framew/

Background Processes in ASP.NET Web Applications

https://www.c-sharpcorner.com/uploadfile/CMouli/background-processes-in-asp-net-web-applications/

Background Processes in ASP.NET Web Applications

http://www.dotnetfunda.com/articles/show/613/background-processes-in-asp-net-web-applications

Run background tasks in ASP.NET Applications with .NET Framework 4.5.2

https://blog.jcorioland.io/archives/2014/05/13/run-background-tasks-in-aspnet-applications-with-dotnet-framework-452.html

How to run Background process in ASP.NET web Application

https://stackoverflow.com/questions/16601815/how-to-run-background-process-in-asp-net-web-application

How to run Background Tasks in ASP.NET

https://www.hanselman.com/blog/HowToRunBackgroundTasksInASPNET.aspx

Scheduled Tasks In ASP.NET With Quartz.Net

https://www.mikesdotnetting.com/article/254/scheduled-tasks-in-asp-net-with-quartz-net

ASP.NET scheduled jobs

https://stackoverflow.com/questions/20259376/asp-net-scheduled-jobs

Tự động thực thi tác vụ theo lịch trong ASP.NET với Quartz.NET

https://tedu.com.vn/lap-trinh-aspnet/tu-dong-thuc-thi-tac-vu-theo-lich-trong-aspnet-voi-quartznet-87.html

How to send mail at a certain time from asp.net web application

https://stackoverflow.com/questions/14433795/how-to-send-mail-at-a-certain-time-from-asp-net-web-application

Use Quartz.NET.

Quartz.NET is a full-featured, open source enterprise job scheduling system written in .NET platform that can be used from smallest apps to large scale enterprise systems.

You can use Windows Task Scheduler as well, but you need some specific windows permissions to do that on production server.

Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records

http://www.intstrings.com/ramivemula/articles/sending-automated-emails-asynchronously-using-a-c-windows-service-in-conjunction-with-database-email-records-part-i/
http://www.intstrings.com/ramivemula/articles/sending-automated-emails-asynchronously-using-a-c-windows-service-in-conjunction-with-database-email-records-part-ii/

Notification Service - A Windows Service in C#

https://code.msdn.microsoft.com/windowsdesktop/Notification-Service-A-adf433b7

Simulate a Windows Service using ASP.NET to run scheduled jobs

https://www.codeproject.com/Articles/12117/Simulate-a-Windows-Service-using-ASP-NET-to-run-sc

How to send mail automatically for every five minutes using C#?

http://www.dotnetfunda.com/articles/show/931/how-to-send-mail-automatically-for-every-five-minutes-using-csharp

Executing a Stored Procedure using SQLCMD

https://www.sqlservercurry.com/2009/11/executing-stored-procedure-using-sqlcmd.html

Task Scheduler Managed Wrapper

https://archive.codeplex.com/?p=taskscheduler

CodeProject
----------------
codeproject - automatically send emails

https://www.codeproject.com/search.aspx?q=automatically+send+emails&usfc=false&doctypeid=4%3b5

codeproject - /KB/system/WindowsService.aspx

https://www.codeproject.com/script/common/404.aspx?aspxerrorpath=/KB/system/WindowsService.aspx

CodeProject - Omar Al Zabir: 2008 & 2011
-----------------------------------------------------
Fast, Scalable, Streaming AJAX Proxy - continuously deliver data from across domains

https://www.codeproject.com/Articles/25218/Fast-Scalable-Streaming-AJAX-Proxy-continuously-de

Fast ASP.NET Web page loading by downloading multiple JavaScripts after visible content and in batch

https://www.codeproject.com/Articles/25929/Fast-ASP-NET-Web-page-loading-by-downloading-multi

Ten Caching Mistakes that Break your App

https://www.codeproject.com/KB/web-cache/cachingmistakes.aspx?pageflow=FixedWidth

Categories

Recent posts