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
    • Empower Replay: Limited Edition
    • 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
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • 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)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

automation – create schedule tasks

Solved1.28K views29th June 2022automation scipt Scheduler
1
Jeroen Geldhof [SLC] [DevOps Enabler]5.07K 29th June 2022 0 Comments

are there any good examples of creating scheduled tasks from an automation script?

Jeroen Geldhof [SLC] [DevOps Enabler] Selected answer as best 29th June 2022

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Debeuf Klaas [SLC] [DevOps Advocate]1.67K Posted 29th June 2022 0 Comments

Hi Jeroen,
I found a regression test where this code is used to create a scheduled task.

private void CreateScheduledTask(ElementID elementId)
{
var startTime = DateTime.UtcNow.AddHours(10);
bool isUpdate = false;

var generalInfo = new List<String>();
generalInfo.Add(TASKNAME); // Name
generalInfo.Add(startTime.ToString(“yyyy-MM-dd”)); // Start Date (YYYY-MM-DD)
generalInfo.Add(“”); // End Date (YYYY-MM-DD)
generalInfo.Add(startTime.ToString(“HH:mm:ss”)); // Start Time (HH:MM)
generalInfo.Add(“once”); // recurrence: { once, daily, weekly, monthly }
generalInfo.Add(“”); // run interval (months, days of week, days of month)
generalInfo.Add(“-1″); // number of repeats before final actions are executed
generalInfo.Add($”{RT_NAME}_Description”); // Description
generalInfo.Add(“True”); // enabled: true/false
generalInfo.Add(“”); // End run time (HH:MM) (only affects daily tasks)
generalInfo.Add(“”); // minutes interval for weekly/monthly tasks (either an enddate or a repeat count should be specified)

var reportAction = new List<string>()
{
“report”, //action type
$”{RT_NAME}_FakeReportTemplate”, //report name
RT_NAME, //subject
TO_ADDRESS, //TO
null, null, null,
$”ELEMENT:{elementId.ToString()}:{PARAMETER_FILTER}” // Filter with “<” character
};

var array = new String[3][][];
array[0] = new String[1][]; // General Info
array[1] = new String[2][]; // Actions
array[2] = new String[0][]; // Final Actions: there are none
array[0][0] = generalInfo.ToArray();
array[1][0] = reportAction.ToArray();

var msg = new SetSchedulerInfoMessage();
msg.What = 1; //1 = CREATE
msg.DataMinerID = _appocalypseHelper.GetHelper.GetDmaId();
msg.Info = Int32.MaxValue;
msg.Ppsa = new PPSA(array);

_engine.SendSLNetMessage(msg);
}

Moderator note: This is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice.

Jeroen Geldhof [SLC] [DevOps Enabler] Selected answer as best 29th June 2022
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