Why does cron start twice every night?Crontab Output problemRunning CRON job on Ubuntu server for SugarCRMHow to stop cron from mailing me?Cron fails at nightCron doesn't execute one of the scheduled jobsRemoving Prior Crontabs
Why does transition from one electron shell to another shell always produce massless photon?
What does IKEA-like mean?
Does "Op. cit." stand for "opus citatum" or "opere citato"?
What can I do to avoid potential charges for bribery?
Water Bottle Rocket Thrust - two calculation methods not matching
How effective are nunchaku as a choking weapon?
Can I use I2C over 2m cables?
How can we check whether the user input equal to one elements of an array?
Would my post-apocalyptic US Government be able to work and function properly?
How are steel imports supposed to threaten US national security?
Why didn't Kes send Voyager home?
Why is matter-antimatter asymmetry surprising, if asymmetry can be generated by a random walk in which particles go into black holes?
QGIS can't detect negative values?
Conveying the idea of " judge a book by its cover" by " juger un livre par sa couverture"
Proving roots of a function cannot all be real
recreating old mechanisme
Is having your hand in your pocket during a presentation bad?
A car vs the car - English Article
Meaning of A-infinity relations
How to find out which object is taking space?
Is It normal to keep log file larger than data file?
Relation between signal processing and control systems engineering?
Would 5.5 x 2.1 mm male plug work inside a 5.5 x 2.5 mm female jack for DC power?
Test if two food are the same
Why does cron start twice every night?
Crontab Output problemRunning CRON job on Ubuntu server for SugarCRMHow to stop cron from mailing me?Cron fails at nightCron doesn't execute one of the scheduled jobsRemoving Prior Crontabs
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I run on Ubuntu 18.04.2 and use cron for various script management and watchdog. In particular I restart some daemontools process every night.
For some unknown reason, every morning I find a double instance of cron
ps -A | grep cron
I can kill it manually and could automate it of course, but I would'nt understand why.
I looked into /etc/cron.* and could not find unexpected double scripts.
Which part of Ubuntu rules cron?
pgrep -a cron;
1221 /usr/sbin/cron -f
3811 /usr/sbin/CRON -f
systemctl status cron.service
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-04-17 00:50:51 UTC; 1 day 13h ago
Docs: man:cron(8)
Main PID: 1221 (cron)
Tasks: 16
Memory: 544.0M
CPU: 1d 11h 10min 53.180s
CGroup: /system.slice/cron.service
├─ 1221 /usr/sbin/cron -f
├─ 3811 /usr/sbin/CRON -f
├─ 3814 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3815 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3816 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 3817 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─ 6069 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6070 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6071 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 6073 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─27218 /usr/sbin/CRON -f
├─27221 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─27222 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─27538 /bin/bash /root/civilia/STS/gtfs-rt/scripts/watchDog.sh
├─28014 bash /var/svc.d/STSAG-create-gtfs-rt/esclave.sh rs
└─28028 sleep 5
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24187]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24188]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:36:02 VM-001 CRON[24189]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session closed for user root
Apr 18 14:36:10 VM-001 CRON[24187]: pam_unix(cron:session): session closed for user root
Apr 18 14:38:02 VM-001 CRON[27217]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27219]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:38:02 VM-001 CRON[27218]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27221]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
18.04 bash cron
add a comment
|
I run on Ubuntu 18.04.2 and use cron for various script management and watchdog. In particular I restart some daemontools process every night.
For some unknown reason, every morning I find a double instance of cron
ps -A | grep cron
I can kill it manually and could automate it of course, but I would'nt understand why.
I looked into /etc/cron.* and could not find unexpected double scripts.
Which part of Ubuntu rules cron?
pgrep -a cron;
1221 /usr/sbin/cron -f
3811 /usr/sbin/CRON -f
systemctl status cron.service
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-04-17 00:50:51 UTC; 1 day 13h ago
Docs: man:cron(8)
Main PID: 1221 (cron)
Tasks: 16
Memory: 544.0M
CPU: 1d 11h 10min 53.180s
CGroup: /system.slice/cron.service
├─ 1221 /usr/sbin/cron -f
├─ 3811 /usr/sbin/CRON -f
├─ 3814 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3815 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3816 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 3817 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─ 6069 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6070 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6071 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 6073 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─27218 /usr/sbin/CRON -f
├─27221 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─27222 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─27538 /bin/bash /root/civilia/STS/gtfs-rt/scripts/watchDog.sh
├─28014 bash /var/svc.d/STSAG-create-gtfs-rt/esclave.sh rs
└─28028 sleep 5
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24187]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24188]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:36:02 VM-001 CRON[24189]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session closed for user root
Apr 18 14:36:10 VM-001 CRON[24187]: pam_unix(cron:session): session closed for user root
Apr 18 14:38:02 VM-001 CRON[27217]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27219]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:38:02 VM-001 CRON[27218]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27221]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
18.04 bash cron
2
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
2
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:pgrep -a cron; systemctl status cron.service
.
– Pablo A
Apr 18 at 2:36
/usr/sbin/CRON
is running as process 3811. Take a look at that file with thefile
command and maybestrings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actualcron
-/usr/sbin/cron
. It has a higher process number, so it may have been started later thancron
(not guaranteed - process IDs wrap).
– Joe
Apr 25 at 1:05
Ifcron
were really running twice every night, it would do all the jobs incrontab
twice. If you create a script that just appends the output ofdate
to a file and add it tocrontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.
– Joe
Apr 25 at 1:21
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49
add a comment
|
I run on Ubuntu 18.04.2 and use cron for various script management and watchdog. In particular I restart some daemontools process every night.
For some unknown reason, every morning I find a double instance of cron
ps -A | grep cron
I can kill it manually and could automate it of course, but I would'nt understand why.
I looked into /etc/cron.* and could not find unexpected double scripts.
Which part of Ubuntu rules cron?
pgrep -a cron;
1221 /usr/sbin/cron -f
3811 /usr/sbin/CRON -f
systemctl status cron.service
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-04-17 00:50:51 UTC; 1 day 13h ago
Docs: man:cron(8)
Main PID: 1221 (cron)
Tasks: 16
Memory: 544.0M
CPU: 1d 11h 10min 53.180s
CGroup: /system.slice/cron.service
├─ 1221 /usr/sbin/cron -f
├─ 3811 /usr/sbin/CRON -f
├─ 3814 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3815 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3816 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 3817 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─ 6069 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6070 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6071 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 6073 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─27218 /usr/sbin/CRON -f
├─27221 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─27222 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─27538 /bin/bash /root/civilia/STS/gtfs-rt/scripts/watchDog.sh
├─28014 bash /var/svc.d/STSAG-create-gtfs-rt/esclave.sh rs
└─28028 sleep 5
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24187]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24188]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:36:02 VM-001 CRON[24189]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session closed for user root
Apr 18 14:36:10 VM-001 CRON[24187]: pam_unix(cron:session): session closed for user root
Apr 18 14:38:02 VM-001 CRON[27217]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27219]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:38:02 VM-001 CRON[27218]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27221]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
18.04 bash cron
I run on Ubuntu 18.04.2 and use cron for various script management and watchdog. In particular I restart some daemontools process every night.
For some unknown reason, every morning I find a double instance of cron
ps -A | grep cron
I can kill it manually and could automate it of course, but I would'nt understand why.
I looked into /etc/cron.* and could not find unexpected double scripts.
Which part of Ubuntu rules cron?
pgrep -a cron;
1221 /usr/sbin/cron -f
3811 /usr/sbin/CRON -f
systemctl status cron.service
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-04-17 00:50:51 UTC; 1 day 13h ago
Docs: man:cron(8)
Main PID: 1221 (cron)
Tasks: 16
Memory: 544.0M
CPU: 1d 11h 10min 53.180s
CGroup: /system.slice/cron.service
├─ 1221 /usr/sbin/cron -f
├─ 3811 /usr/sbin/CRON -f
├─ 3814 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3815 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 3816 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 3817 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─ 6069 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6070 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─ 6071 /bin/sh /root/civilia/Candiac/tech/parkingMonitoring-LoRa/prediction.sh
├─ 6073 /usr/lib/R/bin/exec/R --slave --no-restore --file=/root/civilia/Candiac/tech/parkingMonitoring-LoRa//prediction.R
├─27218 /usr/sbin/CRON -f
├─27221 /bin/sh -c /root/civilia/general/admin_server/minuteRoutine.sh
├─27222 /bin/sh /root/civilia/general/admin_server/minuteRoutine.sh
├─27538 /bin/bash /root/civilia/STS/gtfs-rt/scripts/watchDog.sh
├─28014 bash /var/svc.d/STSAG-create-gtfs-rt/esclave.sh rs
└─28028 sleep 5
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24187]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:36:02 VM-001 CRON[24188]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:36:02 VM-001 CRON[24189]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
Apr 18 14:36:02 VM-001 CRON[24186]: pam_unix(cron:session): session closed for user root
Apr 18 14:36:10 VM-001 CRON[24187]: pam_unix(cron:session): session closed for user root
Apr 18 14:38:02 VM-001 CRON[27217]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27219]: (root) CMD (php /var/www/html/public_html/portail-Civilia/cron/disconnectionTracker.php > /dev/null )
Apr 18 14:38:02 VM-001 CRON[27218]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 18 14:38:02 VM-001 CRON[27221]: (root) CMD (/root/civilia/general/admin_server/minuteRoutine.sh)
18.04 bash cron
18.04 bash cron
edited Apr 18 at 14:39
Xavier Prudent
asked Apr 17 at 19:45
Xavier PrudentXavier Prudent
1064 bronze badges
1064 bronze badges
2
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
2
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:pgrep -a cron; systemctl status cron.service
.
– Pablo A
Apr 18 at 2:36
/usr/sbin/CRON
is running as process 3811. Take a look at that file with thefile
command and maybestrings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actualcron
-/usr/sbin/cron
. It has a higher process number, so it may have been started later thancron
(not guaranteed - process IDs wrap).
– Joe
Apr 25 at 1:05
Ifcron
were really running twice every night, it would do all the jobs incrontab
twice. If you create a script that just appends the output ofdate
to a file and add it tocrontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.
– Joe
Apr 25 at 1:21
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49
add a comment
|
2
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
2
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:pgrep -a cron; systemctl status cron.service
.
– Pablo A
Apr 18 at 2:36
/usr/sbin/CRON
is running as process 3811. Take a look at that file with thefile
command and maybestrings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actualcron
-/usr/sbin/cron
. It has a higher process number, so it may have been started later thancron
(not guaranteed - process IDs wrap).
– Joe
Apr 25 at 1:05
Ifcron
were really running twice every night, it would do all the jobs incrontab
twice. If you create a script that just appends the output ofdate
to a file and add it tocrontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.
– Joe
Apr 25 at 1:21
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49
2
2
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
2
2
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:
pgrep -a cron; systemctl status cron.service
.– Pablo A
Apr 18 at 2:36
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:
pgrep -a cron; systemctl status cron.service
.– Pablo A
Apr 18 at 2:36
/usr/sbin/CRON
is running as process 3811. Take a look at that file with the file
command and maybe strings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actual cron
- /usr/sbin/cron
. It has a higher process number, so it may have been started later than cron
(not guaranteed - process IDs wrap).– Joe
Apr 25 at 1:05
/usr/sbin/CRON
is running as process 3811. Take a look at that file with the file
command and maybe strings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actual cron
- /usr/sbin/cron
. It has a higher process number, so it may have been started later than cron
(not guaranteed - process IDs wrap).– Joe
Apr 25 at 1:05
If
cron
were really running twice every night, it would do all the jobs in crontab
twice. If you create a script that just appends the output of date
to a file and add it to crontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.– Joe
Apr 25 at 1:21
If
cron
were really running twice every night, it would do all the jobs in crontab
twice. If you create a script that just appends the output of date
to a file and add it to crontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.– Joe
Apr 25 at 1:21
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134750%2fwhy-does-cron-start-twice-every-night%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134750%2fwhy-does-cron-start-twice-every-night%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
please add the results of the command too. systemd rules cron :+
– Rinzwind
Apr 17 at 20:42
2
On thing are the scripts that cron starts and other cron itself. Please add the output of your command or probably better this one:
pgrep -a cron; systemctl status cron.service
.– Pablo A
Apr 18 at 2:36
/usr/sbin/CRON
is running as process 3811. Take a look at that file with thefile
command and maybestrings -n 6 | less
to see what it is/what's in it. My kubuntu 18.04 system doesn't have that file, so it's probably some sort of script that works with the actualcron
-/usr/sbin/cron
. It has a higher process number, so it may have been started later thancron
(not guaranteed - process IDs wrap).– Joe
Apr 25 at 1:05
If
cron
were really running twice every night, it would do all the jobs incrontab
twice. If you create a script that just appends the output ofdate
to a file and add it tocrontab
as a daily job, you'll see immediately (the next day) exactly when it ran and if it ran more than once in the same day.– Joe
Apr 25 at 1:21
Thank you Joe, the script that seems to be running twice is a minute-wise one (minuteRoutine.sh). It looks like it started as I included flock -xn for each process.
– Xavier Prudent
Apr 25 at 17:49