Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Scheduled Task gets disabled after single run

34 views1 hour agoIDmsSchedulerTask Scheduler Scheduler Task scheduling
1
Julien Vermeulen [SLC] [DevOps Advocate]207 6 hours ago 0 Comments

Hi,

For our use case we want to create a scheduled task which runs a simple Automation Script (sleep for 3 seconds) every x amount of minutes. To do this we use the following code:

private readonly IDmsScheduler _scheduler;
public void ScheduleReferenceAutomationScriptRuns(string scriptName, int repetitionIntervalInMinutes = 1)
{
var action = DmsSchedulerActionBuilders.CreateScriptAction()
.WithScriptName(scriptName)
.Build();
var builder = _scheduler.CreateTaskBuilder()
.WithActions(new List<IDmsSchedulerAction> { action })
.WithTaskName($"{TaskNamePrefix} Interval {scriptName}")
.WithDescription($"Runs the script every {repetitionIntervalInMinutes} minutes every day")
.WithRepetitionType(DmsSchedulerRepetitionType.Daily)
.WithRepetitionIntervalInMinutes(repetitionIntervalInMinutes.ToString())
.WithIsEnabled(true);

var task = builder.Build();
_scheduler.CreateTask(task);
}

This creates the scheduled task with seemingly no issues but after the task gets triggered for the first time and the automation script completes. The task gets disabled.
Creating a similar Scheduled Task manually does not have the same behaviour.

If you need more information, please let me know.

Kind regards,

Brent [SLC] Answered question 5 hours ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Brent [SLC]2.29K Posted 5 hours ago 0 Comments

Hi Julien,

Could you try and add the following line to the builder. ".WithRepetitions(-1)" (see docs). This should tell the task to run infinitely instead of a set amount of repetitions or until the defined end date is reached, which in your case means indefinitely as there is no endtime defined.  It seems the taskbuilder defaults the repetition value to 0 which causes only 1 runtime, whilst the cube UI sends an empty string if the box is not checked, resulting in a value of -1, which is treated as infinite runtimes..

If this does not help, it may be useful to compare the manually created task with the task created by the builder to see what other setting differ and adapt the builder from there. If you post it as a comment I may be able to offer some advise.

Feel free to reach out to techSupport to further look into this.

Kind regards,

Brent [SLC] Edited answer 1 hour ago
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin