How to Run a .Net Console App on a Schedule using the Task Scheduler!

Sdílet
Vložit
  • čas přidán 20. 12. 2021
  • If you liked the content, please consider checking out my Patreon! - / membership Hey everyone, in this video, we are going to check out how to run a .net console application on a set schedule using the task scheduler. Thanks for watching!
  • Věda a technologie

Komentáře • 9

  • @starriet
    @starriet Před 2 lety

    great to see how to do the same thing with both C# and Python

  • @marlonchosky
    @marlonchosky Před rokem +1

    Great explanation! I didn't know you could deploy a console app as a Schedule on the Task Scheduler.
    I hold a question though... Since this kind of c# project can be deployed as a Task on Windows, what would be the difference between this kind of deploying (using a IHost) and deploying a WorkerService project as a Windows Service? Wouldn't both executables do the same thing, i.e. potentially run some logic on a loop until the task is canceled/stopped?

  • @ajitthapa9196
    @ajitthapa9196 Před rokem +1

    Hi, If i wanna not use a physical server and want to use docker instead. how do i run this task schedular in a docker contaimer ?

  • @tugrularslan542
    @tugrularslan542 Před rokem

    Hello. Beste Thanks for this video. This help me very gretafull. :-) Could we execute a GUI C# application also with the Task Scheduler ?
    Do you have rest weekend

  • @jakescript_
    @jakescript_ Před 2 lety

    Hey man, do you have a discord channel for your CZcams channel? I'd like to talk sometime.

  • @calvinkoay1939
    @calvinkoay1939 Před 2 lety +1

    How do I use Task Scheduler to run a C# program with different arguments at different time? You miss out on this

    • @user-fy3zz5td3p
      @user-fy3zz5td3p Před 11 měsíci

      You can schedule another task for a different time. You can pass arguments under the Action you specify for the new task, within the arguments field.

  • @user-fy3zz5td3p
    @user-fy3zz5td3p Před 11 měsíci

    Any idea how to make a .net 7.0 application run silently from task scheduler as we could in .net framework? I coded it initially as a console application, and in framework previously the way to get it to run as a silent task was go to project properties and switch the output type from console application to windows application. However, in .net 7.0 (core) that does not do the trick. I get errors. In case it was the culprit, I then later tried to specify the target env. , and version (but left entry point set to "(none)" since I wasn't sure how to change that safely). The error I am seeing in Windows logs when trying to launch the .exe of a build when set to "Windows application" instead of "Console application" is: Faulting module name: KERNELBASE.dll; Fault bucket 1871558923827721962, type 4;Event Name: APPCRASH. 'Appreciate any potential help.

  • @SangNguyen-gq7wq
    @SangNguyen-gq7wq Před 6 měsíci

    how to laucher a program