Cron not launching jobs?
up vote
2
down vote
favorite
This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to your case, or other Mainline Ubunutu distributions.
For some wacky unknown reason, I have a cron job that is not running, so I started digging around, and found a not on NixCraft website, that says i might need to enable cron using systemctl. Ok fine, there is an example, so i try it. I authenticate, and it proceeds to fail.
# systemctl enable cron.service
Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cron
looks like cron service is enabled right? well, on boot then, @reboot /usr/bin/motion -b
should run, but it doesn't. I looked int /var/log/syslog
and see a spot where it looks like cron fails, but Im not sure what to do next.
Jun 17 04:08:37 ELAR-Systems systemd[1]: Reloading.
Jun 17 04:08:37 ELAR-Systems systemd[1]: message repeated 2 times: [ Reloading.]
Jun 17 04:09:01 ELAR-Systems cron[347]: Authentication token is no longer valid; new one required
Jun 17 04:09:01 ELAR-Systems CRON[1629]: Authentication token is no longer valid; new one required
Wondering how to fix this....
bash cron root users passwd
add a comment |
up vote
2
down vote
favorite
This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to your case, or other Mainline Ubunutu distributions.
For some wacky unknown reason, I have a cron job that is not running, so I started digging around, and found a not on NixCraft website, that says i might need to enable cron using systemctl. Ok fine, there is an example, so i try it. I authenticate, and it proceeds to fail.
# systemctl enable cron.service
Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cron
looks like cron service is enabled right? well, on boot then, @reboot /usr/bin/motion -b
should run, but it doesn't. I looked int /var/log/syslog
and see a spot where it looks like cron fails, but Im not sure what to do next.
Jun 17 04:08:37 ELAR-Systems systemd[1]: Reloading.
Jun 17 04:08:37 ELAR-Systems systemd[1]: message repeated 2 times: [ Reloading.]
Jun 17 04:09:01 ELAR-Systems cron[347]: Authentication token is no longer valid; new one required
Jun 17 04:09:01 ELAR-Systems CRON[1629]: Authentication token is no longer valid; new one required
Wondering how to fix this....
bash cron root users passwd
3
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
2
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to your case, or other Mainline Ubunutu distributions.
For some wacky unknown reason, I have a cron job that is not running, so I started digging around, and found a not on NixCraft website, that says i might need to enable cron using systemctl. Ok fine, there is an example, so i try it. I authenticate, and it proceeds to fail.
# systemctl enable cron.service
Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cron
looks like cron service is enabled right? well, on boot then, @reboot /usr/bin/motion -b
should run, but it doesn't. I looked int /var/log/syslog
and see a spot where it looks like cron fails, but Im not sure what to do next.
Jun 17 04:08:37 ELAR-Systems systemd[1]: Reloading.
Jun 17 04:08:37 ELAR-Systems systemd[1]: message repeated 2 times: [ Reloading.]
Jun 17 04:09:01 ELAR-Systems cron[347]: Authentication token is no longer valid; new one required
Jun 17 04:09:01 ELAR-Systems CRON[1629]: Authentication token is no longer valid; new one required
Wondering how to fix this....
bash cron root users passwd
This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to your case, or other Mainline Ubunutu distributions.
For some wacky unknown reason, I have a cron job that is not running, so I started digging around, and found a not on NixCraft website, that says i might need to enable cron using systemctl. Ok fine, there is an example, so i try it. I authenticate, and it proceeds to fail.
# systemctl enable cron.service
Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cron
looks like cron service is enabled right? well, on boot then, @reboot /usr/bin/motion -b
should run, but it doesn't. I looked int /var/log/syslog
and see a spot where it looks like cron fails, but Im not sure what to do next.
Jun 17 04:08:37 ELAR-Systems systemd[1]: Reloading.
Jun 17 04:08:37 ELAR-Systems systemd[1]: message repeated 2 times: [ Reloading.]
Jun 17 04:09:01 ELAR-Systems cron[347]: Authentication token is no longer valid; new one required
Jun 17 04:09:01 ELAR-Systems CRON[1629]: Authentication token is no longer valid; new one required
Wondering how to fix this....
bash cron root users passwd
bash cron root users passwd
edited Jun 17 at 11:13
asked Jun 16 at 18:20
j0h
6,2331351111
6,2331351111
3
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
2
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46
add a comment |
3
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
2
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46
3
3
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
2
2
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....
# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@ELAR-Systems:# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ELAR-Systems:# chage -l root
Last password change : Jun 16, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.
I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.
add a comment |
up vote
0
down vote
Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using
sudo nano /etc/crontab
rather than sudo crontab
.
I put the command to run at the required time ...
30 13 * * * root shutdown -h now
All worked perfectly - even when Linux did not have a logged in user.
add a comment |
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',
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/3.0/"u003ecc by-sa 3.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%2f1047175%2fcron-not-launching-jobs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....
# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@ELAR-Systems:# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ELAR-Systems:# chage -l root
Last password change : Jun 16, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.
I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.
add a comment |
up vote
0
down vote
on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....
# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@ELAR-Systems:# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ELAR-Systems:# chage -l root
Last password change : Jun 16, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.
I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.
add a comment |
up vote
0
down vote
up vote
0
down vote
on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....
# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@ELAR-Systems:# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ELAR-Systems:# chage -l root
Last password change : Jun 16, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.
I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.
on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....
# chage -l root
Last password change : password must be changed
Password expires : password must be changed
Password inactive : password must be changed
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
root@ELAR-Systems:# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ELAR-Systems:# chage -l root
Last password change : Jun 16, 2018
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.
I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.
answered Jun 17 at 11:18
j0h
6,2331351111
6,2331351111
add a comment |
add a comment |
up vote
0
down vote
Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using
sudo nano /etc/crontab
rather than sudo crontab
.
I put the command to run at the required time ...
30 13 * * * root shutdown -h now
All worked perfectly - even when Linux did not have a logged in user.
add a comment |
up vote
0
down vote
Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using
sudo nano /etc/crontab
rather than sudo crontab
.
I put the command to run at the required time ...
30 13 * * * root shutdown -h now
All worked perfectly - even when Linux did not have a logged in user.
add a comment |
up vote
0
down vote
up vote
0
down vote
Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using
sudo nano /etc/crontab
rather than sudo crontab
.
I put the command to run at the required time ...
30 13 * * * root shutdown -h now
All worked perfectly - even when Linux did not have a logged in user.
Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using
sudo nano /etc/crontab
rather than sudo crontab
.
I put the command to run at the required time ...
30 13 * * * root shutdown -h now
All worked perfectly - even when Linux did not have a logged in user.
edited Nov 10 at 15:09
Thomas
3,49081427
3,49081427
answered Nov 10 at 14:34
Alan Carton
1
1
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f1047175%2fcron-not-launching-jobs%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
3
If you have solved, please post the solution as an answer.
– muru
Jun 16 at 18:30
2
Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks.
– user535733
Jun 16 at 19:46