[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

      New-JobTrigger -RepetitionInterval (New-TimeSpan -Hours 2) -RepetitionDuration ([timeSpan]::maxvalue-At (get-date-Once

    • #205116
      Participant
      Topics: 4
      Replies: 2249
      Points: 5,494
      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 3 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: 4
      Replies: 2249
      Points: 5,494
      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.