{"id":20827219,"url":"https://github.com/uwekeim/exitcodegenerator","last_synced_at":"2026-04-21T17:34:50.710Z","repository":{"id":70423623,"uuid":"155464409","full_name":"UweKeim/ExitCodeGenerator","owner":"UweKeim","description":"Console application to sleep for a given amount of milliseconds and then return a given exit code.","archived":false,"fork":false,"pushed_at":"2018-10-31T10:31:05.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T22:28:50.454Z","etag":null,"topics":["console-application","csharp","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/UweKeim.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-10-30T22:27:35.000Z","updated_at":"2022-12-09T11:28:16.000Z","dependencies_parsed_at":"2023-05-14T17:15:44.435Z","dependency_job_id":null,"html_url":"https://github.com/UweKeim/ExitCodeGenerator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UweKeim%2FExitCodeGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UweKeim%2FExitCodeGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UweKeim%2FExitCodeGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UweKeim%2FExitCodeGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UweKeim","download_url":"https://codeload.github.com/UweKeim/ExitCodeGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243174896,"owners_count":20248362,"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":["console-application","csharp","windows"],"created_at":"2024-11-17T23:11:27.925Z","updated_at":"2026-04-21T17:34:45.667Z","avatar_url":"https://github.com/UweKeim.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exit Code Generator\n\nTool to sleep for a given amount of milliseconds and then return a given exit code.\n\n**[Download latest executable](https://github.com/UweKeim/ExitCodeGenerator/releases/download/v1.0.0.0/exitcode-generator.exe)**\n\n## Introduction\n\nThis is a small Windows command line utility to sleep for a given amount of milliseconds and then return a given exit code. \n\nIt is intended as a mockup for testing external application calls. \n\nE.g. I'm using it in testing an application of mine that calls an external command line virus scanner, that takes some time to run and returns different exit codes depending on whether a virus was detected or not. Instead of specifying the actual virus scanner on our test machines, I simply call the `exitcode-generator.exe` with different parameters.\n\n## Usage\n\n\texitcode-generator.exe \n\t    [--exitcode=\u003ccode\u003e] \n\t    [--sleep=\u003cmilliseconds\u003e] \n\t    [--log=\u003ctrue|false\u003e] \n\t    [--keeplogfiles=\u003ctrue|false\u003e] \n\t    [--quiet=\u003ctrue|false\u003e]\n\n(Multi-line for illustration purposes only; call as a single line in real life).\n\n## Command line arguments\n\n`--exitcode=\u003ccode\u003e`:\n\u003e Optional. Specify an integer exit code, positive or negative or zero to\n\u003e return from the application. If none is specified, zero is returned.\n\n`--sleep=\u003cmilliseconds\u003e`:\n\u003e Optional. Specify a positive amount of milliseconds to sleep before exiting.\n\u003e If none is specified, the application returns immediately.\n\n`--log=\u003ctrue|false\u003e`:\n\u003e Optional. Specify whether to log to a file at all.\n\u003e If not specified, the default value is false.\n\n`--keeplogfile=\u003ctrue|false\u003e`:\n\u003e Optional. Specify whether to clear any existing log file upon program start.\n\u003e If not specified, the default value is true. Useful for calling the program\n\u003e multiple times and having one large cumulated log file.\n\n`--quiet=\u003ctrue|false\u003e`:\n\u003e Optional. Specify whether to output anything to the console at all.\n\u003e If not specified, the default value is false, meaning it does output text.\n\n## Examples\n\nImmediately return exit code -2:\n\n\u003e     exitcode-generator.exe --exitcode=-2\n\nWait for 2 seconds and then return exit code 5:\n\n\u003e     exitcode-generator.exe --sleep=2000 --exitcode=5\n\nWait for 3.5 seconds and then return exit code 0:\n\n\u003e     exitcode-generator.exe --sleep=3500\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwekeim%2Fexitcodegenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwekeim%2Fexitcodegenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwekeim%2Fexitcodegenerator/lists"}