crontab’s @reboot only works for root?
man 5 crontab is pretty clear on how to use crontab to run a script on boot:
man 5 crontab is pretty clear on how to use crontab to run a script on boot:
I am aware of a lot of pitfalls in the magic world of crontabs, but sometimes it would help troubleshooting a lot when you have some smart way to enter an interactive (bash) shell with exact identical environment as when a shell script is run from a crontab.
I have some Java executable (jar) that is run my some shell script from a cron job once every night. That executable does not print log statements “as usual” just by printing them out in a sequential manner like line after line (print after print), but while it processes its data its printing a single line with status data and then “overwrite” or “update” just that single line over and over again, until its done with this part of processing.
I have a deployment script.
It must add something to a user crontab
(trigger a script that cleans logs every XXX days);
however, this must be done only during the first deployment,
or when it needs to be updated.
I have a script run from a non-privileged users’ crontab that invokes some commands using sudo. Except it doesn’t. The script runs fine but the sudo’ed commands silently fail.
I have a test.sh script
I need my script to be executed a minute after each reboot. When I apply @reboot in my crontab it is too early for my script – I want the script to be executed after all other tasks that are routinely run on reboot. How might I run the script sometime after reboot?
I’ve got a bunch of CronJobs, and they work fine, except for one. I’ve looked through a lot of forums and websites, and tried a combination of things but alas nothing has worked.
I’ve been migrating my crontabs to systemd’s timer units. They all look similar to this:
I am trying to run a bash script I have via cron, and I am getting the following error at the beginning of the execution: