dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

New-DbaAgentSchedule's documentation does not illustrate most of its parameters

Open ReeceGoding opened this issue 8 months ago • 0 comments

Summarize Functionality

Every time that I want to use New-DbaAgentSchedule, I need to crack open my copy of Learn dbatools in a Month of Lunches. Standard parameters aside, the function has 14 parameters:

  1. [[-Job] <Object[]>]
  2. [[-Schedule] <Object>]
  3. [-Disabled]
  4. [[-FrequencyType] <Object>]
  5. [[-FrequencyInterval] <Object[]>]
  6. [[-FrequencySubdayType] <Object>]
  7. [[-FrequencySubdayInterval] <Int32>]
  8. [[-FrequencyRelativeInterval] <Object>]
  9. [[-FrequencyRecurrenceFactor] <Int32>]
  10. [[-StartDate] <String>]
  11. [[-EndDate] <String>]
  12. [[-StartTime] <String>]
  13. [[-EndTime] <String>]
  14. [[-Owner] <String>]

Of these 14 parameters, more than half have no examples in the documentation. Specifically, the following 9 have none:

  • [[-Job] <Object[]>]
  • [-Disabled]
  • [[-FrequencySubdayType] <Object>]
  • [[-FrequencySubdayInterval] <Int32>]
  • [[-FrequencyRelativeInterval] <Object>]
  • [[-StartDate] <String>]
  • [[-EndDate] <String>]
  • [[-EndTime] <String>]
  • [[-Owner] <String>]

and Force is used in every example.

This should be corrected, but the fact that I have to use the documentation so much to notice this issue proves that I'm not qualified to solve it!

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

Directly stealing examples from Learn dbatools in a Month of Lunches would be a great step forward. A little more variety in the schedules would also be welcome. For example, I'm sure that plenty of people write jobs that run twice per day or every hour.

ReeceGoding avatar Jun 21 '24 15:06 ReeceGoding