All Projects → dahall → Taskscheduler

dahall / Taskscheduler

Licence: mit
Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Taskscheduler

Realtaiizor
C# WinForm UI/UX Component Library
Stars: ✭ 109 (-82.64%)
Mutual labels:  winforms, component
React Accessible Accordion
Accessible Accordion component for React
Stars: ✭ 610 (-2.87%)
Mutual labels:  component
Vue Img Inputer
🏞 A graceful image type inputer / uploader
Stars: ✭ 548 (-12.74%)
Mutual labels:  component
Vue Table Component
A straight to the point Vue component to display tables
Stars: ✭ 592 (-5.73%)
Mutual labels:  component
React Markdown Editor Lite
a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
Stars: ✭ 553 (-11.94%)
Mutual labels:  component
Velocityx
A minimalist Flutter framework for rapidly building custom designs.
Stars: ✭ 595 (-5.25%)
Mutual labels:  component
Vuesax
New Framework Components for Vue.js 2
Stars: ✭ 5,293 (+742.83%)
Mutual labels:  component
Vue Tabs Component
An easy way to display tabs with Vue
Stars: ✭ 616 (-1.91%)
Mutual labels:  component
Messenger
The Messenger component helps application send and receive messages to/from other applications or via message queues.
Stars: ✭ 603 (-3.98%)
Mutual labels:  component
React Scrollbars Custom
The best React custom scrollbars component
Stars: ✭ 576 (-8.28%)
Mutual labels:  component
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+826.91%)
Mutual labels:  task-scheduler
Google Map React
Google map library for react that allows rendering components as markers 🎉
Stars: ✭ 5,529 (+780.41%)
Mutual labels:  component
Incubator Dolphinscheduler
Apache DolphinScheduler is a distributed and extensible workflow scheduler platform with powerful DAG visual interfaces, dedicated to solving complex job dependencies in the data pipeline and providing various types of jobs available out of box.
Stars: ✭ 6,916 (+1001.27%)
Mutual labels:  task-scheduler
Ribbonwinforms
An Office Ribbon Control for .NET WinForms
Stars: ✭ 551 (-12.26%)
Mutual labels:  winforms
Rsuite
🧱 A suite of React components .
Stars: ✭ 6,344 (+910.19%)
Mutual labels:  component
React Range
🎚️Range input with a slider. Accessible. Bring your own styles and markup.
Stars: ✭ 545 (-13.22%)
Mutual labels:  component
React Laag
Hooks to build things like tooltips, dropdown menu's and popovers in React
Stars: ✭ 568 (-9.55%)
Mutual labels:  component
React Cookbook
编写简洁漂亮,可维护的 React 应用
Stars: ✭ 594 (-5.41%)
Mutual labels:  component
Expanding Collection
ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
Stars: ✭ 5,456 (+768.79%)
Mutual labels:  component
React Native Snackbar
🍱 Material Design "Snackbar" component for Android and iOS.
Stars: ✭ 613 (-2.39%)
Mutual labels:  component

Task Scheduler Managed Wrapper

Version Downloads Build status

The original .NET wrapper for the Windows Task Scheduler that aggregates the multiple versions and provides localized controls for editing.

Quick Links

Installation

This project's assemblies are available via NuGet or manually from the .zip files in the Releases section.

Link Package Name Description
NuGet TaskScheduler Main Library
NuGet TaskSchedulerEditor UI Library

You can also find prerelease NuGet pacakges on the project's AppVeyor NuGet feed.

Once referenced by your project, all classes can be found in the Microsoft.Win32.TaskScheduler namespace.

Project Components

Main Library

Microsoft introduced version 2.0 (internally version 1.2) with a completely new object model with Windows Vista. The managed assembly closely resembles the new object model, but allows the 1.0 (internally version 1.1) COM objects to be manipulated. It will automatically choose the most recent version of the library found on the host system (up through 1.4). Core features include:

  • Separate, functionally identical, libraries for .NET 2.0, 3.5, 4.0, 4.52, .NET Standard 2.0, .NET Core 2.0, 2.1, 3.0, 3.1 and (drumroll please) .NET 5.0.
  • Unlike the base COM libraries, this wrapper helps to create and view tasks up and down stream.
  • Written in C#, but works with any .NET language including scripting languages (e.g. PowerShell).
  • Supports all V2 native properties, even under V1 systems.
  • Maintain EmailAction and ShowMessageAction using PowerShell scripts for systems after Win8 where these actions have been deprecated.
  • Supports all action types (not just ExecAction) on V1 systems (XP/WS2003) and earlier (if PowerShell is installed).
  • Supports multiple actions on V1 systems (XP/WS2003). Native library only supports a single action.
  • Supports serialization to XML for both 1.0 and 2.0 tasks (base library only supports 2.0)
  • Supports task validation for targeted version.
  • Supports secure task reading and maintenance.
  • Fluent methods for task creation.
  • Cron syntax for trigger creation.
  • Supports reading "custom" triggers under Win8 and later.
  • Numerous work-arounds and checks to compensate for base library shortcomings.

The currently supported localizations include: English, Spanish, Italian, French, Chinese (Simplified), German, Polish and Russian. Others localizations can be added upon request, especially if you're willing to help with translations.

The project is based on work the originator started in January 2002 with the 1.0 library that is currently hosted on CodeProject.

UI Library

A second library includes localized and localizable GUI editors and a wizard for tasks which mimic the ones in Vista and later and adds optional pages for new properties. Following is the list of available UI controls:

  • Task editor dialog and tabbed control which mimics system editor (TaskEditDialog)
  • Task editor dialog using newer UI scheme (TaskOptionsEditor)
  • Task creation wizard which mimics system Basic editor
  • Action editor dialog
  • Trigger editor dialog
  • Event viewer dialog
  • Task / task folder selection dialog
  • Task history viewer
  • Task run-times viewer
  • Task service connection dialog
  • Simplified classes for pulling events from the system event log.
  • A DropDownCheckList control that is very useful for selecting flag type enumerations.
  • A FullDateTimePicker control which allows both date and time selection in a single control.
  • A CredentialsDialog class for prompting for a password which wraps the Windows API.

Sample Code

There is a help file included with the download that provides an overview of the various classes. There are numerous examples under the "Documentation" tab.

You can perform a number of actions in a single line of code:

// Run a program every day on the local machine
TaskService.Instance.AddTask("Test", QuickTriggerType.Daily, "myprogram.exe", "-a arg");

// Run a custom COM handler on the last day of every month
TaskService.Instance.AddTask("Test", new MonthlyTrigger { RunOnLastDayOfMonth = true }, 
    new ComHandlerAction(new Guid("{CE7D4428-8A77-4c5d-8A13-5CAB5D1EC734}")));

For many more options, use the library classes to build a complex task. Below is a brief example of how to use the library from C#.

using System;
using Microsoft.Win32.TaskScheduler;

class Program
{
   static void Main(string[] args)
   {
      // Get the service on the remote machine
      using (TaskService ts = new TaskService(@"\\RemoteServer", "username", "domain", "password"))
      {
         // Create a new task definition and assign properties
         TaskDefinition td = ts.NewTask();
         td.RegistrationInfo.Description = "Does something";

         // Create a trigger that will fire the task at this time every other day
         td.Triggers.Add(new DailyTrigger { DaysInterval = 2 });

         // Create an action that will launch Notepad whenever the trigger fires
         td.Actions.Add(new ExecAction("notepad.exe", "c:\\test.log", null));

         // Register the task in the root folder.
         // (Use the username here to ensure remote registration works.)
         ts.RootFolder.RegisterTaskDefinition(@"Test", td, TaskCreation.CreateOrUpdate, "username");
      }
   }
}

For extended examples on how to the use the library, look in the source code area or look at the Examples Page. The library closely follows the Task Scheduler 2.0 Scripting classes. Microsoft has some examples on Microsoft Docs around it that may further help you understand how to use this library.


This project appreciatively uses:

ReSharper from JetBrains ReSharper from JetBrains

Sandcastle Help File Builder Sandcastle Help File Builder

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].