Kaseya Community

'Schedule script' for a specific time

  • OK, forgive me if this is obvious or answered somewhere else - gut can't seem to find it.

    is there a way to call a script and have it scheduled at a particular time? I see the "schedule a script" option, but it just has the "delay in x minutes" before it runs. I'd like one script to call another and schedule it for a particular time, i.e. one that runs at 2:00pm but schedules a second one to run at 4:AM (the next day)

    Background:
    - I'd like to automatically notify users when we're scheduling a server reboot. So I kick off a script that sends e-mails to the client contact, which also schedules a script to run at 4AM to do the reboot (which then also checks status in 30 minutes and sends either a note to us that it's still offline, or a note to the client that all went well).

    Thoughts?

    Thanks in advance!

    rj

    Legacy Forum Name: 'Schedule script' for a specific time,
    Legacy Posted By Username: rbjsea
  • Hmmm, anyone?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rbjsea
  • I am not aware of how to do this... however in K6 you'll be able to do away with having multiple scripts and combine these actions into one (AKA nested if statements). Then I believe you'll be able to do what you want (the scheduling will be improved as well).

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: boudj
  • you could run a serise of scripts that leave files behind, the first sends a warning or what ever and leaves a txt file or something, the next checks for it and tidys up... and drops another one etc...

    or just schedule 2 scripts one for the warning and the second to do the reboot...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty
  • rbjsea
    is there a way to call a script and have it scheduled at a particular time?


    We've had success using the at command. For instance, we may want to reboot an agent at 5:00am the next day, so we'll execute shell command:
    at 05:00 shutdown -r

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ttroyer@emaple.net