Score:1

How can I schedule a script to run routinely in Landscape?

in flag

I have created a script in Landscape to run apt update and apt upgrade on the rest of my Ubuntu servers. The script works great but I can't see any options to have it scheduled to run daily or weekly or anything, I can only kick it off manually. What's the procedure to get the script to run regularly?

EODCraft Staff avatar
cn flag
Search `Cronjob`
kanehekili avatar
zw flag
Go with [systemd-timer](https://wiki.archlinux.org/title/Systemd/Timers)
in flag
So this can't be done from within Landscape? If I'm doing this from the shell, where do the scripts created in Landscape live?
David avatar
cn flag
What version of Ubuntu?
in flag
Landscape is running on 18.04.6 LTS.
Score:0
in flag

Landscape doesn't currently have recurring jobs. Scripts are one-time operations which happen either as soon as delivered to the client machine or at a specific future time. You have a couple of options:

  1. create a cron job or systemd timer on the client machine.
  2. create a cron job to launch a script remotely from the landscape-api at regular intervals

There are also other tools which might do what you're trying to achieve.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.