runtime error - Cannot find an overload for op_subtraction when subtracting datetime from datetime in powershell -
I can not get a surcharge for the error of op_subtraction error while running the code given below, Reporting that the second argument is invalid. The defective line is: if ($ - now - (non-job- $ $ job id.) PSBeginTime -gt [Timespain] :: From Minutes ($ KillTaskTimeMins) { (changed below for help with debugging) if (($ $ - $ when) -gt [Timespain]: : Minutes ($ killTaskTimeMins)) Full code: $ ($ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ throttle jobs are moving at any one time (@ (Get-jobs | object-object {$ _. state -akyu 'Running'}). Count-gate $ throttle) {start-Sleep- Millisecun $ $ Throttle Sleep MMS # Matter any work speculation, kill after X minutes = now $ = matching-date forwarding ($ job-in @ (Get-Job -State Running)) {# $ when = Coalesce (Get- Job -Id $ job.id) .PSBeginTime, $ now) is a custom task to make sure that it is not zero; but the writeer did not help to host, but it was not empty, however $$ = (Get-Job-$ job.id) was removed. PSBeginTime ...
Comments
Post a Comment