Yep, although for once a day, you could just shorten the whole command to -Command "& {Get-ChildItem -Path (Join-Path -Path '<path-to-notes-folder>' -ChildPath '*.md') -File | ForEach-Object { if ($_.LastWriteTime.AddMinutes(5) -le (Get-Date)) { $_.LastWriteTime = (Get-Date).AddYears(1) }}}" and set the task to run periodically once per day
. The difference is that this way, you won't have a PowerShell window hanging there all the time in the background, taking RAM.