{"id":14064287,"url":"https://github.com/jdhitsolutions/MyTasks","last_synced_at":"2025-07-29T17:33:12.006Z","repository":{"id":145020074,"uuid":"66404980","full_name":"jdhitsolutions/MyTasks","owner":"jdhitsolutions","description":"A PowerShell module that offers a simple task management or to-do system.","archived":true,"fork":false,"pushed_at":"2022-09-15T21:04:38.000Z","size":1343,"stargazers_count":53,"open_issues_count":0,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-21T03:39:40.786Z","etag":null,"topics":["powershell","powershell-module"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":false,"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/jdhitsolutions.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2016-08-23T21:32:37.000Z","updated_at":"2024-09-18T20:28:24.000Z","dependencies_parsed_at":"2023-05-02T05:02:44.637Z","dependency_job_id":null,"html_url":"https://github.com/jdhitsolutions/MyTasks","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyTasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyTasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyTasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyTasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdhitsolutions","download_url":"https://codeload.github.com/jdhitsolutions/MyTasks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228032926,"owners_count":17858918,"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":["powershell","powershell-module"],"created_at":"2024-08-13T07:03:47.672Z","updated_at":"2024-12-04T02:31:33.546Z","avatar_url":"https://github.com/jdhitsolutions.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# MyTasks\n\n[![PSGallery Version](https://img.shields.io/powershellgallery/v/myTasks.png?style=for-the-badge\u0026logo=powershell\u0026label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/myTasks/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/MyTasks.png?style=for-the-badge\u0026label=Downloads)](https://www.powershellgallery.com/packages/MyTasks/)\n\n\u003e :heavy_exclamation_mark: The `MyTasks` module is __no longer under active development__. It has been replaced by [PSWorkItem](https://github.com/jdhitsolutions/PSWorkItem). The PSWorkItem module uses the same concepts as MyTasks, but stores tasks, PSWorkItems in the new module, in a SQLite database. Installing PSWorkItem will also install the [MySQLite])https://github.com/jdhitsolutions/MySQLite/) module.  All open issues for MyTasks will be closed.\n\nThis PowerShell module is designed as a task or a simple To-Do manager. The module contains several commands for working with tasks. It should work with both Windows PowerShell and PowerShell 7.x  with a few limitations. You can install the latest version from the PowerShell Gallery. You might want to need the `-Scope` parameter for PowerShell 7.x.\n\n```powershell\nInstall-Module MyTasks [-scope currentuser]\n```\n\nTask data is stored in an XML file. Other configuration information is stored in simple text files. Here are a few highlights.\n\n## A Class-Based Module\n\nThis module uses a class definition for the task object and is designed to work on both Windows PowerShell and PowerShell Core.\n\n```powershell\nClass MyTask {\n    [int]$ID\n    [string]$Name\n    [string]$Description\n    [datetime]$DueDate\n    [bool]$Overdue\n    [String]$Category\n    [ValidateRange(0, 100)][int]$Progress\n    hidden[bool]$Completed\n    hidden[datetime]$TaskCreated = (Get-Date)\n    hidden[datetime]$TaskModified\n    hidden[guid]$TaskID = (New-Guid)\n    # ID and OverDue values are calculated at run time.\n\n    # Methods\n\n    #set task as completed\n    [void]CompleteTask([datetime]$CompletedDate) {\n        Write-Verbose \"[CLASS  ] Completing task: $($this.name)\"\n        $this.Completed = $True\n        $this.Progress = 100\n        $this.Overdue = $False\n        $this.TaskModified = $CompletedDate\n    }\n\n    #check if task is overdue and update\n    hidden [void]Refresh() {\n        Write-Verbose \"[CLASS  ] Refreshing task $($this.name)\"\n        #only mark as overdue if not completed and today is greater than the due date\n        Write-Verbose \"[CLASS  ] Comparing $($this.DueDate) due date to $(Get-Date)\"\n\n        if ($This.completed) {\n            $this.Overdue = $False\n        }\n        elseif ((Get-Date) -gt $this.DueDate) {\n            $this.Overdue = $True\n        }\n        else {\n            $this.Overdue = $False\n        }\n\n    } #refresh\n\n    #Constructors\n    MyTask([string]$Name) {\n        Write-Verbose \"[CLASS  ] Constructing with name: $name\"\n        $this.Name = $Name\n        $this.DueDate = (Get-Date).AddDays(7)\n        $this.TaskModified = (Get-Date)\n        $this.Refresh()\n    }\n    #used for importing from XML\n    MyTask([string]$Name, [datetime]$DueDate, [string]$Description, [string]$Category, [boolean]$Completed) {\n        Write-Verbose \"[CLASS  ] Constructing with due date, description and category\"\n        $this.Name = $Name\n        $this.DueDate = $DueDate\n        $this.Description = $Description\n        $this.Category = $Category\n        $this.TaskModified = $this.TaskCreated\n        $this.Completed = $completed\n        $this.Refresh()\n    }\n\n} #end class definition\n```\n\nWhile you could use the object's properties and methods directly, you should use the appropriate module command.\n\n## XML Data\n\nAll of the task information is stored in an XML file. The commands in this module will read in, update, and remove items as needed using PowerShell commands such as `Select-XML`. By default, these files are stored in your Documents folder (on Windows systems) or in the Home folder (on Linux). You can change the default location by using the [Set-myTaskHome](docs/Set-MyTaskHome.md) command. This is helpful if you are sharing task information between computers via a service like Dropbox or OneDrive.\n\n```powershell\nSet-MyTaskHome -path C:\\Users\\Jeff\\dropbox\\mytasks\\\n```\n\nIf you use this feature, you'll need to make sure you run this command before doing anything. It is recommended to put this command in a PowerShell profile script.\n\nYou shouldn't have to manage the module related variables directly. Use `Get-MyTaskHome` to view your current settings.\n\n## Categories\n\nThe Task object includes a Category property. The module will define a default set of categories (\"Work\",\"Personal\",\"Customer\",\"Other\"), but users can create their own by using the MyTaskCategory commands:\n\n+ [Add-MyTaskCategory](docs/Add-MyTaskCategory.md)\n+ [Get-MyTaskCategory](docs/Get-MyTaskCategory.md)\n+ [Remove-MyTaskCategory](docs/Remove-MyTaskCategory.md)\n\nTask information is stored in a text file in the `$myTaskHome` location.\n\n## Basic Usage\n\nYou create a task with at least a name and category. The default due date will be 7 days from the current date and time.\n\n```powershell\nNew-MyTask \"return library books\" -Category personal\n```\n\nYou can also specify a due date.\n\n```powershell\nNew-MyTask \"Pluralsight\" -duedate \"2/1/2020\" -description \"renew subscription\" -category other\n```\n\nYou can use `Set-MyTask` to modify a task.\n\n```powershell\nGet-MyTask Pluralsight | Set-Mytask -DueDate 3/1/2020\n```\n\nBecause the task has a Progress property, you can use [Set-MyTask](docs/Set-MyTask.md) to update that as well. This is intended to be used as a percentage complete.\n\n```powershell\nSet-Mytask \"book review\" -Progress 60\n```\n\nUse `Get-MyTask` to view tasks. Normally, you will use [Get-MyTask](docs/Get-MyTask.md) to display all tasks, some tasks or a single item:\n\n```powershell\nPS S:\\\u003e Get-MyTask -name MemoryTools\n\nID  Name         Description                DueDate OverDue Category  Progress\n--  ----         -----------                ------- ------- --------  --------\n8   MemoryTools  update module            7/22/2020 False   Projects        10\n```\n\nThe default behavior is to display incomplete tasks due in the next 30 days. Look at the help for `Get-MyTask` for more information.\n\nThis module has a custom format file that uses ANSI escape sequences to color-code tasks. Overdue tasks will be shown in red. Tasks due in the next 48 hours will be shown in orange.\n\n![Get-MyTask](images/get-mytask.png)\n\nThis command may not work as expected in the PowerShell ISE or the VS Code PowerShell Integrated shell.\n\nWhen a task is finished, you can mark it as complete.\n\n```powershell\nComplete-MyTask -name \"order coffee\"\n```\n\nThe task will remain but be marked as 100% complete. You can still see the task when using the -All parameter with `Get-MyTask` or `Show-MyTask`. At some point you might want to remove completed tasks from the master XML file. You can use [Remove-MyTask](docs/Remove-MyTask.md) to permanently delete them. Or use the `Archive-MyTask` command to move them to an archive XML file.\n\n## Format Views\n\nThe module includes a `format.ps1xml` file that defines a default display when you run `Get-MyTask`. You will get a slightly different set of properties when you run `Get-MyTask | Format-List`. There is also a custom table view called `Category` which will create a table grouped by the Category property. You should sort the tasks first:\n\n```powershell\nGet-MyTask | Sort-Object Category | Format-Table -view category\n```\n\nOr you can use the `DueDate` table view - sort on DueDate\n\n```powershell\nGet-MyTask -days 180 | Sort-Object duedate | Format-Table -view duedate\n```\n\n![formatted views](images/show-mytask-2.png)\n\n## Archiving and Removing\n\nOver time your task file might get quite large. Even though the default behavior is to ignore completed tasks, you have an option to archive them to a separate XML file using `Save-MyTask` which has an alias of `Archive-MyTask`:\n\n```powershell\nGet-MyTask -Completed | Archive-MyTask\n```\n\nThere is an option to archive tasks when you run [Complete-MyTask](docs/Complete-MyTask.md). Or you can completely delete a task with `Remove-MyTask`.\n\nUse the `Get-MyTaskArchive` to view archived tasks.\n\n## Email Reminders\n\nIf you are running this module on Windows PowerShell that includes the PSScheduledJob module, you can create a scheduled PowerShell job that will send you a daily email with tasks that are due in 3 days or less. The default is a plain text message but you can also send it as HTML. Use the [Enable-EmailReminder](docs/Enable-EmailReminder.md) command to set up the job.\n\nYou should read full help and examples for all commands as well as the [about_MyTasks](docs/about_MyTasks.md) help file.\n\n+ [Add-MyTaskCategory](docs/Add-MyTaskCategory.md)\n+ [Backup-MyTaskFile](docs/Backup-MyTaskFile.md)\n+ [Complete-MyTask](docs/Complete-MyTask.md)\n+ [Get-MyTask](docs/Get-MyTask.md)\n+ [Get-MyTaskCategory](docs/Get-MyTaskCategory.md)\n+ [New-MyTask](docs/New-MyTask.md)\n+ [Remove-MyTask](docs/Remove-MyTask.md)\n+ [Remove-MyTaskCategory](docs/Remove-MyTaskCategory.md)\n+ [Save-MyTask](docs/Save-MyTask.md)\n+ [Set-MyTask](docs/Set-MyTask.md)\n+ [Enable-EmailReminder](docs/Enable-EmailReminder.md)\n+ [Disable-EmailReminder](docs/Disable-EmailReminder.md)\n+ [Get-EmailReminder](docs/Get-EmailReminder.md)\n+ [Set-MyTaskHome](docs/Set-MyTaskHome.md)\n+ [Get-MyTaskHome](docs/Get-MyTaskHome.md)\n+ [Get-MyTaskArchive](docs/Get-MyTaskArchive.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2FMyTasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdhitsolutions%2FMyTasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2FMyTasks/lists"}