{"id":21537113,"url":"https://github.com/rabanti-github/taskrunner","last_synced_at":"2025-03-17T20:41:39.936Z","repository":{"id":86671259,"uuid":"96645105","full_name":"rabanti-github/TaskRunner","owner":"rabanti-github","description":"Task Runner is a simple Windows command line tool (.NET/C#) to execute several tasks controlled by XML config files, such as deleting files, deleting registry entries, write logfile entries or execute programs.","archived":false,"fork":false,"pushed_at":"2018-07-21T10:12:44.000Z","size":441,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T07:41:33.765Z","etag":null,"topics":["command-line-tool","registry","task-runner","utility","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rabanti-github.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-07-08T21:25:25.000Z","updated_at":"2024-04-26T07:11:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"42c4bcd7-9773-41bc-b844-4e462eabb6ee","html_url":"https://github.com/rabanti-github/TaskRunner","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabanti-github%2FTaskRunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabanti-github%2FTaskRunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabanti-github%2FTaskRunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabanti-github%2FTaskRunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabanti-github","download_url":"https://codeload.github.com/rabanti-github/TaskRunner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244109784,"owners_count":20399559,"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","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":["command-line-tool","registry","task-runner","utility","windows"],"created_at":"2024-11-24T03:28:04.383Z","updated_at":"2025-03-17T20:41:39.912Z","avatar_url":"https://github.com/rabanti-github.png","language":"C#","readme":"# TaskRunner\nTask Runner is a simple Windows command line tool to execute several tasks controlled by XML config files, such as deleting files, terminate processes, deleting registry entries, write logfile entries or execute programs.\n\n\u003cb\u003ePlease have a look at the \u003ca href=\"../../wiki\"\u003eWiki\u003c/a\u003e for more information.\u003c/b\u003e\n\n**Purpose**\n----------------------\n\u003cb\u003ePreamble\u003c/b\u003e\n\nIt was a nice Sunday in July 2017 when I suddenly noticed that \u003ccode\u003e\u0026lt;Insert your favorite Foe Application\u0026gt;\u003c/code\u003e changed something after the last update. The \u003ccode\u003e\u0026lt;FoeApp\u0026gt;\u003c/code\u003e hooked itself into the Windows auto-start and the option to disable this seemed to be broken. The only way to prevent the auto-start of \u003ccode\u003e\u0026lt;FoeApp\u0026gt;\u003c/code\u003e was to use one of the obvious Windows optimization utilities or to delete an entry in the Windows registry under \u003ci\u003eHKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\u003c/i\u003e. However, \u003ccode\u003e\u0026lt;FoeApp\u0026gt;\u003c/code\u003e did not care! After starting the app, the registry entry was there again! After fiddling around, I decided to write a small utility to delete this registry entry on each logoff. Moreover, while developing, I added further features to my utility, because there are enough \u003ccode\u003e\u0026lt;FoeApps\u0026gt;\u003c/code\u003e out there with various misbehaviors.\n\n\u003cb\u003eHow to use\u003c/b\u003e\n\nTaskRunner is meant to be added as a task in the Windows task scheduler. The advantage of using this utility instead of the task scheduler directly is that the configuration of TaskRunner can be done simply by altering the XML code of the configuration. Furthermore, the configuration can contain an arbitrary number of Sub-Tasks.\n\nThe TaskRunner has only to be registered once in the task scheduler with the proper arguments. E.g.:\n\u003ccode\u003eTaskRuner.exe --run C:/tasks/config.xml --log C:/tasks/logfile.log\u003c/code\u003e\n\nAll Sub-Tasks are now defined in the file \u003ci\u003eC:/tasks/config.xml\u003c/i\u003e. Furthermore, the result of each task execution will be logged into \u003ci\u003eC:/tasks/logfile.log\u003c/i\u003e. The task in the Windows Task Scheduler does not have to be altered anymore.\n\nThe utility can be used of course as a standalone application, e.g., in combination with a BAT file to run repeating tasks just by double-clicking on the BAT file.\n\n**Prerequisites**\n----------------------\nTaskRunner was written in C# and relies on Windows functionalities. The only prerequisites are:\n\n* A Windows System (7 / 8.x / 10)\n* An installed .NET Framework (at least .NET 4.5) \n\nFurthermore, you need the following knowledge when using TaskRunner:\n\n* Basic knowledge of XML (tags, attributes, escaping, etc.)\n* Basic knowledge how to run a command line application\n* Basic knowledge about the Windows task scheduler or the local group policy editor (gpedit.msc) if you want to use TaskRunner as proxy app\n\n\n**Usage**\n---------------\n\u003cb\u003eNormal Usage:\u003c/b\u003e\n\n\u003ccode\u003eTaskRunner.exe -r [path to configuration] \u0026lt;options\u0026gt;\u003c/code\u003e\n\n\u003cb\u003eGeneration of example files of the configuration:\u003c/b\u003e\n\n\u003ccode\u003eTaskRunner.exe -e\u003c/code\u003e\n\n\u003cb\u003eGeneration of markdown files of the documentation:\u003c/b\u003e\n\n\u003ccode\u003eTaskRunner.exe -m\u003c/code\u003e\n\nPath to the configuration: A relative or absolute path to the configuration as XML file\n\n**Parameter Handling**\n---------------\nThe flag \u003ccode\u003e-p\u003c/code\u003e or \u003ccode\u003e--param\u003c/code\u003e delivers a temporary parameter to the TaskRunner. The parameter is only valid during the execution of the loaded task.\n\nSyntax: \u003ccode\u003e-p|--param:\u003ci\u003e\u0026lt;data type\u0026gt;\u003c/i\u003e:\u003ci\u003e\u0026lt;param name\u0026gt;\u003c/i\u003e:\u003ci\u003e\u0026lt;param value\u0026gt;\u003c/i\u003e\u003c/code\u003e\n\nThe parameter flag contains 3 or 4 parts, delimited by colons:\n* 1: \u003cb\u003eFlag Identifier\u003c/b\u003e (-p or --param)\n* 2: (Optional) \u003cb\u003eData Type\u003c/b\u003e. Valid values are '\u003ccode\u003es\u003c/code\u003e' for string, '\u003ccode\u003eb\u003c/code\u003e' for boolean and '\u003ccode\u003en\u003c/code\u003e' for number (double). If this part is omitted, the value will be handled as string\n* 3: \u003cb\u003eParameter Name\u003c/b\u003e (unique string, without spaces or colons)\n* 4: \u003cb\u003eParameter Value\u003c/b\u003e (The value will be parsed to boolean or double in case of the data types '\u003ccode\u003eb\u003c/code\u003e' or '\u003ccode\u003en\u003c/code\u003e')\n\n\u003cb\u003eExamples:\u003c/b\u003e\n```dos\n-p:n:NUMBER_OF_FILES:8\n\n--param:b:MATCH:true\n\n--param:NAME:machine1\n\n-p:s:NAME:\"Name with spaces\"\n\n--param:COMMENT:'Other quotes are also OK'\n```\n\n\n**Flags / Options**\n---------------\n\u003ccode\u003e-r | --run\u003c/code\u003e:      Runs a task defined in the subsequent config file (path)\n\n\u003ccode\u003e-e | --example\u003c/code\u003e:  Runs the demo command and generates example configurations in the program folder\n\n\u003ccode\u003e-o | --output\u003c/code\u003e:   Enables the output mode. The results of the task will be displayed in the shell (cmd)\n\n\u003ccode\u003e-s | --stop\u003c/code\u003e:     The task runner stops after an error. Otherwise, all sub-tasks are executed until the end of the configuration\n\n\u003ccode\u003e-l | --log\u003c/code\u003e:      Enables logging. After the flag, a valid path (absolute or relative) to a logfile must be defined \n\n\u003ccode\u003e-h | --help\u003c/code\u003e:     Shows the program help\n\n\u003ccode\u003e-d | --docs\u003c/code\u003e:     Shows the menu with the documentation\n\n\u003ccode\u003e-m | --markdown\u003c/code\u003e: Saves the documentation as markdown files \n\n\n**Possible Tasks**\n--------------\nPlease look at the demo files and into the \u003ca href=\"../../wiki\"\u003eWiki\u003c/a\u003e for all parameters and a detailed description of the configuration.\n\n\u003cb\u003eDeleteFileTask:\u003c/b\u003e\n\nThe tasks deletes one or several files. There are no additional options. At the moment, no wildcards are allowed.\n\n\u003cb\u003eDeleteRegKeyTask:\u003c/b\u003e\n\nThe task deletes a value of a reg key in the Windows registry. Several hives like HKLM or HKCU can be defined. Note that write permission to the registry must be granted to execute such a task.\n\n\u003cb\u003eWriteLogTask:\u003c/b\u003e\n\nWrites a defined text with the time stamp of the execution time into the defined logfile. The logfile header is optional and can be passed as argument (see demo files).\n\n\u003cb\u003eStartProgramTask:\u003c/b\u003e\n\nStarts one or several programs with optional arguments. It is possible to define whether the subtasks are executed synchronous or asynchronous. The later can cause freezing of the task runner if an executed application is not terminated (process is still running).\n\n\u003cb\u003eControlServiceTask:\u003c/b\u003e\n\nStarts, restarts, pauses, resumes or stops a Windows Service by its name. It is possible to define a remote machine name. Furthermore, a specific timeout period can be defined.\n\n\u003cb\u003eKillProcessTask:\u003c/b\u003e\n\nTerminates one or more processes by its name. It is possible to define a remote machine name.\n\n\u003cb\u003eMetaTask:\u003c/b\u003e\n\n A MetaTask loads the configuration files (XML) of other TaskRunner configurations and executes them\n \n \n**Mixed Tasks**\n--------------\nIf the attribute \u003ccode\u003etype\u003c/code\u003e in the \u003ccode\u003e\u0026lt;task\u0026gt;\u003c/code\u003e tag is set to the value \u003cb\u003eMixedTask\u003c/b\u003e, any of the available Tasks can be described in one configuration file. Otherwise, only one task type (as Sub-Tasks) is used in one configuration file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabanti-github%2Ftaskrunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabanti-github%2Ftaskrunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabanti-github%2Ftaskrunner/lists"}