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

Issue creating a single-run Scheduled Task: Code creates separate START and STOP tasks

Solved66 views3 hours ago#automationscripts Automation script Scheduler
2
Jan Palansky [DevOps Advocate]204 1 day ago 0 Comments

Hi Dojo,

I am trying to create an automation script that creates a scheduled task. The goal is to have this task trigger another script with a specific parameter. This task should run only once at a specific date and time.

I have based my code on the documentation here: https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryScheduler.html

And I referenced the API types here: https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Core.Scheduler.Automation.Scheduler.html

Here is the code I am using:

C#
var scheduler = new Scheduler(engine.GetUserConnection(), t => t != null);

        var scheduleOnce = new ScheduleOnce(createSchedulerEvent: true);
        var startTime = DateTime.Now.AddMinutes(1);
        var endTime = startTime.AddMinutes(1);

var paramsList = new List<AutomationScriptInputParameter>
        {
            new AutomationScriptInputParameter(1, "Zacinam"),
        };
        var scriptAction = new AutomationScriptAction("GIE", checkSets: true, runAsync: false, paramsList, Array.Empty<Skyline.DataMiner.Net.Messages.AutomationProtocolInfo>());

        var task = new Skyline.DataMiner.Core.Scheduler.Automation.SchedulerTask("TestScheduledRun", "Run Just Once", startTime, endTime, scheduleOnce, scriptAction);
scheduler.CreateOrUpdateSchedulerTask(task);

The Issue: I expected this to create a single task in the Scheduler named "TestScheduledRun". However, it creates two separate tasks:
  1. GIE - TestScheduledRun - START (runs at startTime)
  2. GIE - TestScheduledRun - STOP (runs at endTime)

My Question: How can I create a single task that executes only once at the defined time, without generating the secondary STOP task?

Any advice is appreciated. Thanks!

Jan Palansky [DevOps Advocate] Selected answer as best 3 hours ago

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Pieter Carlu [SLC] [DevOps Advocate]250 Posted 24 hours ago 1 Comment

Hi Jan,

This is because a scheduled task is created for each event (START and STOP), more information can be found here.
If you don't want to use the events and just have one scheduled task, you should change your script so that:
var scheduleOnce = new ScheduleOnce(createSchedulerEvent: false);

Hope this helps you further!

Kind regards,

Pieter

Jan Palansky [DevOps Advocate] Selected answer as best 3 hours ago
Jan Palansky [DevOps Advocate] commented 4 hours ago

thank you very much.
createSchedulerEvent: false works for me. This is exactly what I expected.
best regards
jan

You are viewing 1 out of 2 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

© 2025 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