Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

derekantrican/ClockworkFramework

Repository files navigation

Clockwork

NuGet version (ClockworkFramework.Core)

A basic automation framework for running tasks on an interval. Useful for things like periodically accessing an API, sending daily emails, etc

Getting started

  1. Install .NET 6 if you do not have it installed already
  2. Clone the repo
  3. Run dotnet build
  4. Running the resulting executable will run the example tasks

To set up your own library of tasks:

  1. Create a folder (ideally, not inside the ClockworkFramework folder)

  2. Run dotnet new console

  3. Run dotnet add package ClockworkFramework.Core

  4. Add one or more classes that implement IClockworkTaskBase and a method with the [TaskMethod] & [Interval(..)] attributes (see Examples)

    For some common needs like calling an API or running a process you can use the Utilties class. See ExampleApiTask

  5. In the same directory as ClockworkFramework.exe create config.json. Here is an annotated example:

{
 "repositoryUpdateFrequency" : 5, // How often to update each library's repository (if it is a git repository) in minutes
 "libraries" : [
 {
 "path" : "..\\..\\ClockworkTasks", // The path to the library. Can be relative or absolute. Can be a folder (containing a csproj), a csproj, or a dll
 "updateRepository" : true // Whether to update the repository (with `git pull`) on the cadence in repositoryUpdateFrequency
 }
 ]
}
  1. Run the ClockworkFramework.exe to load your new library

About

An automation framework (running individual tasks on their own intervals) written in C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /