On Tue, 2 Jan 2024, Rich Shepard wrote:
On Tue, 2 Jan 2024, Paul Heinlein wrote:
The Linux distributions I use all have an /etc/cron.d directory that
allows you to run scripts under any UID, no sudo required.
Paul,
Yes, Slackware has an /etc/cron.d directory.
The modified crontab entries for snippets in that directory are documented
in the crontab(5) man page, at least on my systems.
When I run `man crontab(5)' nothing happens:
$ man crontab(5)
-bash: syntax error near unexpected token `('
As Galen noted, it's "man 5 crontab." I specified it because many
systems have two crontab man pages, one in section 1, the other in
section 5. The section 1 page becomes the default.
My web searches for cron.d examples found 1 entry specific to debian and
ubuntu.
This is my update-tlmgr.sh:
cd /usr/local/texlive/2023/bin/x86_64-linux/
tlmgr update --self --all
fmtutil-sys --sys -all
cd
Do I put that script in the now empty /etc/cron.d/?
No. Keep your update-tlmgr.sh script where it is.
Your /etc/cron.d fragment might be something like this
# /etc/cron.d/update-tlmgr.cron
27 05 * * * tlmgruser /path/to/update-tlmgr.sh
Please note that "tlmgruser" is just a placeholder for the sake of
discussion. I don't know what user you want to run that script. It
might be root, or it might be a Slackware-specific users.
--
Paul Heinlein
[email protected]
45°22'48" N, 122°35'36" W