A basic Bash script (to start a GUI program) works partially in cron
I use this script to restart Firefox overnight (to apply the package manager and addon updates):
I use this script to restart Firefox overnight (to apply the package manager and addon updates):
On Ubuntu, what is the calling relation between cron and anacron?
I am confused by looking at /etc/anacrontab, /etc/cron.daily/0anacron and /etc/crontab.
Is there any variable that cron sets when it runs a program ? If the script is run by cron, I would like to skip some parts; otherwise invoke those parts.
On Debian 8.1, I’m using a Bash feature to detect whether the stackoverflow.com website is reachable:
My sysadmin has set up a bunch of cron jobs on my machine. I’d like to know exactly what is scheduled for what time. How can I get that list?
I have a cron job that is scheduled to run everyday, other than changing the schedule, is there any other way to do a test run of the command right now to see if it works as intended?
I entered crontab -r instead of crontab -e and all my cron jobs have been removed.
I need to remove files older than 3 days with a cron job in 3 different directories. (these 3 directories are children of a parent directory /a/b/c/1 & /a/b/c/2 & /a/b/c/3) Can this be done with one line in the crontab?
I want to use systemd to run a command every 5 minutes. However, there is a risk that occasionally the task may take longer than 5 minutes to run. At that point, will systemd start a second instance of the command i.e. will I end up with 2 processes running?
This is a Red Hat Enterprise Linux 5 system (RHEL). We manage this system using CFengine.