[timeSpan]::maxvalue return error. How to do RepetitionDuration with max value

Welcome Forums General PowerShell Q&A [timeSpan]::maxvalue return error. How to do RepetitionDuration with max value

Viewing 3 reply threads
  • Author
    Posts
    • #205113
      Participant
      Topics: 8
      Replies: 8
      Points: 93
      Rank: Member

      <span class="verbnoun">New-JobTrigger</span> <span class="modifier">-RepetitionInterval</span> (<span class="verbnoun">New-TimeSpan</span> <span class="modifier">-Hours</span> 2) <span class="modifier">-RepetitionDuration</span> ([<span class="optional">timeSpan</span>]::<span class="method">maxvalue</span>) <span class="modifier">-At</span> (<span class="verbnoun">get-date</span>) <span class="modifier">-Once</span>

    • #205116
      Participant
      Topics: 10
      Replies: 2480
      Points: 6,537
      Helping Hand
      Rank: Community MVP

      Am I wrong or do you want to run this job only once? If so why using a repetition interval at all? If not you may elaborate a little more what you’re trying to do.

      • This reply was modified 11 months, 1 week ago by Olaf.
    • #205125
      Participant
      Topics: 8
      Replies: 8
      Points: 93
      Rank: Member

      I start with power shell now, and still learning, I will create a new question. thanks.

    • #205137
      Participant
      Topics: 10
      Replies: 2480
      Points: 6,537
      Helping Hand
      Rank: Community MVP

      NO … no new question … just explain what you problem is please.

Viewing 3 reply threads
  • The topic ‘[timeSpan]::maxvalue return error. How to do RepetitionDuration with max value’ is closed to new replies.