Skip to main content

Questions tagged [cron]

Cron is a job scheduler that allows users to run commands periodically.

0 votes
1 answer
75 views

Cron shutdown behavior in AWS

I'm just trying to understand the behavior I'm seeing. I tried adding this line to my AWS EC2's (root) crontab: 00 00 * * * shutdown -h now But this never executed. When I added this to my own ec2-...
JTB's user avatar
  • 111
0 votes
0 answers
79 views

job started by BusyBox crond doesn't complete

I need a script to run daily in an Alpine docker container. I have set it up as follows: copy the script to /etc/periodic/daily start the crond daemon in the container's ENTRYPOINT script: /usr/sbin/...
Olivier Gérardin's user avatar
0 votes
0 answers
48 views

Systemd service to keep a fixed number of the same script running

I have been developing a task based system recently for a PHP project, which consists of tasks stored in a SQL database (MariaDB) for a queue, and a task worker PHP script to go through the queue and ...
Jacob Smith's user avatar
1 vote
1 answer
393 views

On my Ubuntu-based distro (Linux Lite), how to auto delete all network connections, disable Wi-Fi and networking as part of booting process?

My end goal here is to have no saved network connections, no enabled Wi-Fi or networking each time I boot up my computer, so that I have to go through a sequence of steps in order to access internet. ...
mark coder's user avatar
-2 votes
1 answer
118 views

Linux command does not run from crontab, but it runs fine from the Linux shell [duplicate]

I set up the following cron job to check every minute if port 8088 is listening. If it isn't, the CLI should write the message Thu Jul 3 12:50:09 UTC 2025 bad to the log file /tmp/crob_log. Here is ...
yael's user avatar
  • 14k
1 vote
3 answers
392 views

Alpine linux (LXC) not running cron jobs

I have been trying for a long to make the crontab entries to run, but it doesn't matter what Time / schedule I enter, it doesn't seem to work. I have confirmed my current time zone with date command &...
Neail's user avatar
  • 99
16 votes
1 answer
3k views

cron every thirty minutes from 13:00 to 17:00 seems easy, but the obvious entry also runs it at 17:30

cronie 1.5.2 on RHEL 8.10 This entry runs foobar every 30 minutes from 13:00 to 17:30. */30 13-17 * * 1-5 foobar.sh Is there some clever (but not hackish, like adding "exit if it's 17:30&...
RonJohn's user avatar
  • 1,473
-1 votes
1 answer
62 views

Merge two different times in cron format

I want to combine two different times which are in cron format into single time in bash shell script: e.g. time1 = 15 03 * * 1-5 time2 = 15 03 * * 6 result should be 15 03 * * 1-6 or e.g. time1 = ...
Vishal's user avatar
  • 1
2 votes
4 answers
295 views

Executing a cron task once a month at a random date and time

Ubuntu 22.04 or AlmaLinux 9.5 I've seen a lot of questions about running scripts in random times during a day using bash's $RANDOM but a month exceeds the limit it has. How can I do that? It is a xdg-...
Daniel Stonek's user avatar
2 votes
1 answer
124 views

How does one run cron jobs in one container that does stuff in another?

I am on Kubernetes. I need to be able to write and run cron jobs in a pod. I can't use the CronJob workload. The solution I found is to run cron jobs from a cron sidecar container. I write cron jobs ...
Mooch's user avatar
  • 41
-3 votes
2 answers
163 views

"rm -f" e-mails me an error, how do I prevent that?

I have cron "clean up" some stuff overnight. A simple rm -f thisandthat. But if there is no file thisandthat, rm -f sends an e-mail to me at [email protected] - No such file or directory. I ...
user637's user avatar
0 votes
0 answers
294 views

Dbus issue when trying to run Wayland session

My distro is based on Slackware, therefore it doesn't have systemd, but SysVinit + elogind. I'm trying to use LightDM to initiliaze my desktop environment sessions, but I have either dbus services ...
Fulalas's user avatar
  • 119
1 vote
1 answer
69 views

How to send a "keypress" to an instance of 'mpg123' started under 'cron'?

I use mpg123 to play a list of songs while I work. The host that actually runs mpg123 and plays the music is a local, headless system, but I can connect to it over SSH. I start mpg123 on this host in ...
Seamus's user avatar
  • 3,833
0 votes
1 answer
82 views

The shell script run by crond keeps stopping after five minutes

As titled, I am using CentOS 6.10 Here is part of my shell script, it runs find manually. #!/bin/sh backup_dir="/mnt/backup/website" all_web="$(</mnt/backup/list.txt)" for web ...
Corey's user avatar
  • 101
2 votes
1 answer
181 views

Executable not found when executed with cron but works fine when running from CLI

Got this cron, which run some scrapy code * * * * * cd /var/projects/project-1/scrappers && python3 runner.py It return this error on the logs Continue with error: [Errno 2] No such file or ...
Ricardo Albear's user avatar

15 30 50 per page
1
2 3 4 5
160