Hello, I am trying to make a crontab schedule for weekly system update (yay
). And the crontab needs the shell script to run the command. How do it make the command run from the shell script?
A shell script is nothing but a list of shell commands. So, a simple (and quite pointless) shell script that runs yay
would be:
#!/bin/sh
yay
In general, however, it is not true that Cron needs a shell script. Any executable will do.
Just a warning: do not try to automate updates on EndeavourOS (or any other derivation of Arch Linux). Manual intervention is often necessary and attempting to automate that will sooner or later create problems for you.
4 Likes
Don’t do this. On an Arch-based distro, updates need manual intervention. Automating them is a bad idea.
4 Likes
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.