Skip to main content
Solved

Variable parameters for each monthly automation run

  • March 7, 2022
  • 5 replies
  • 56 views

I am trying to set up an FME Server Automation, which runs a model every first day of the month. I bump into 2 issues:

 

1) To set up the schedule trigger, i can not choose "every first day of the month". Apperently the monthly option only lets you choose a montly run from the day it is today (in this case every first monday of the month). How to go about?

 

2) I want to let the input parameters change for each monthly run. In this case the model does a calculation from a start date until an end date, and the start date needs to be the first day of the previous month and the end date the first day of the month it runs. How can I make these input parameters a variable?

 

All suggestions welcome!

Best answer by ebygomm

1) The CRONmaker is great, thank you!

2) As for the parameters, I would really prefer to do it on a parameter level, as this model will also need to run outside the monthly automation, with different start and end dates. Any possibility of doing this?

For option 2 could you have optional parameters, unset by default and the workspace then calculates the correct dates relative to the run date after testing if the parameters have values. If they have values, use the values instead?

 

So in your automation the input parameters would be blank, but they would still be available if you need to run the workspace outside of the automation

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • March 7, 2022

You can do the schedule with a Cron expression, I use http://www.cronmaker.com/ to build those.

 

As for the parameters, you can work with a DateTimeCalculator within the workspace itself, that's probably easiest.


1) The CRONmaker is great, thank you!

2) As for the parameters, I would really prefer to do it on a parameter level, as this model will also need to run outside the monthly automation, with different start and end dates. Any possibility of doing this?


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • March 7, 2022

1) The CRONmaker is great, thank you!

2) As for the parameters, I would really prefer to do it on a parameter level, as this model will also need to run outside the monthly automation, with different start and end dates. Any possibility of doing this?

You could make a scripted parameter I guess, with Python or Tcl.

 

Or a 2-stage approach within an automation: workspace 1 does the actual work, can be run manually or through another workspace which is run on a schedule and calculates the appropriate dates


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3435 replies
  • Best Answer
  • March 7, 2022

1) The CRONmaker is great, thank you!

2) As for the parameters, I would really prefer to do it on a parameter level, as this model will also need to run outside the monthly automation, with different start and end dates. Any possibility of doing this?

For option 2 could you have optional parameters, unset by default and the workspace then calculates the correct dates relative to the run date after testing if the parameters have values. If they have values, use the values instead?

 

So in your automation the input parameters would be blank, but they would still be available if you need to run the workspace outside of the automation


For option 2 could you have optional parameters, unset by default and the workspace then calculates the correct dates relative to the run date after testing if the parameters have values. If they have values, use the values instead?

 

So in your automation the input parameters would be blank, but they would still be available if you need to run the workspace outside of the automation

That is a good idea indeed and it looks like the cleanest solution atm. It is a pity however that these parameters can not be made as variables in Automations itself.