server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

Invalid interval value for a monthly frequency: Customized Monthly.

Open MakhdumS opened this issue 1 year ago • 5 comments

I have a schedule in Tableau Server which is set to run on a Monthly basis: Every 11ᵗʰ, 12ᵗʰ, 16ᵗʰ, 24ᵗʰ, 26ᵗʰ day of the month, at 5:05 PM. When I use the below code to retrieve the specific schedule

with server.auth.sign_in(tableau_auth): #print(id) sch_item = server.schedules.get_by_id('xxx') print(sch_item.name)

It results in an error: ValueError: Invalid interval value for a monthly frequency: Customized Monthly.

I've used the Tableau REST API directly to see what the is output in the XML, where I see the interval monthDay is Customized Monthly.

<schedule id="f059d794-90dc-40d0-bfad-2ca78e437369" name="TEST MONTHLY SCHEDULE MAK" state="Active" priority="50" createdAt="2024-03-13T17:05:01Z" updatedAt="2024-03-16T16:05:14Z" type="Extract" frequency="Monthly" nextRunAt="2024-03-24T16:05:00Z" executionOrder="Parallel"><frequencyDetails start="17:05:00"><intervals><interval monthDay="Customized Monthly"/></intervals></frequencyDetails></schedule></tsResponse>

I'm assuming there isn't a way to display the actual dates for the schedule, but does the interval item code need to be updated to handle the value of "Customized Monthly"?

Versions Details of your environment, including:

  • Tableau Server version 2022.1.20
  • Python version 3.11.4
  • TSC library version 0.30

MakhdumS avatar Mar 19 '24 16:03 MakhdumS

We have an existing issue #1354 which has been fixed, but pending a new TSC release.

bcantoni avatar Mar 27 '24 17:03 bcantoni

Closing as a duplicate

bcantoni avatar Apr 27 '24 00:04 bcantoni

@bcantoni I'm not sure this error is actually a duplicate, it seems #1354 was mentioning daily interval, but this is related to monthly schedules.

I'm still getting this error when trying to get schedule info for a task that has a customized monthly schedule. This is using 0.36 version.

Error I receive is: ValueError: Invalid monthly interval: Customized Monthly

when calling server.schedules.get_by_id(task.schedule_id) that has a monthly schedule set to run on first monday of the month.

raccoooonz avatar Feb 03 '25 18:02 raccoooonz

Okay I'll reopen it.

bcantoni avatar Feb 04 '25 18:02 bcantoni

I revisited this one but cannot figure out how to create (in Tableau Server) a monthly interval schedule that returns with the "Customized Monthly" type.

But in the meantime I used the original sample XML response here to create a test (which fails) and then add Customized Monthly to the list of valid intervals.

If anyone would like to try it:

pip install git+https://github.com/tableau/server-client-python.git@bcantoni/1365-monthly-schedule

bcantoni avatar Oct 17 '25 20:10 bcantoni