Errors in crontab file, can't install - only on CentOS 7, not CentOS 6.4? Announcing the...
Coin Game with infinite paradox
What is /etc/mtab in Linux?
How to begin with a paragraph in latex
What was Apollo 13's "Little Jolt" after MECO?
What's called a person who work as someone who puts products on shelves in stores?
How to keep bees out of canned beverages?
Was Objective-C really a hindrance to Apple software development?
How was Lagrange appointed professor of mathematics so early?
Variable does not exist: sObjectType (Task.sObjectType)
Will I be more secure with my own router behind my ISP's router?
Is there an efficient way for synchronising audio events real-time with LEDs using an MCU?
Was there ever a LEGO store in Miami International Airport?
false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'
What's parked in Mil Moscow helicopter plant?
SQL Server placement of master database files vs resource database files
VBA: Single line if statement with multiple actions
Are there existing rules/lore for MTG planeswalkers?
What is the ongoing value of the Kanban board to the developers as opposed to management
Why I cannot instantiate a class whose constructor is private in a friend class?
When speaking, how do you change your mind mid-sentence?
Will I lose my paid in full property
Co-worker works way more than he should
Is there a verb for listening stealthily?
Why is water being consumed when my shutoff valve is closed?
Errors in crontab file, can't install - only on CentOS 7, not CentOS 6.4?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30 pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Backups Failing (Previously Fine) (rdiff-backup)run script with parameter in cronRsync inconsistency between CLI and crontabConfigure selinux to allow openldap on CentOS 6.4Why has Red Hat Cluster Suite stopped working?Incrond running but not executing commands CentOS 6.4How to get Mondorescue to work with LVM2 (CentOS 6.4)Postfix master.cf file modified by unknown at startup on Plesk / CentOS systemnginx stop logging after crontab modified the log fileRsync over ssh in a crontab job will not work
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
CentOS 6.4 is happy with this, but CentOS 7 tells me "errors in crontab file, can't install.". What's wrong with this crontab file (just the 2 lines)?
0 0 * * * /home/web/backup-db.sh
0 1 * * * /home/web/backup-files.sh
I've tried this based on this answer here, this doesn't work either:
every '0 0 * * *' do /home/web/backup-db.sh
every '0 1 * * *' do /home/web/backup-files.sh
It's not permissions on those files, because this doesn't work either:
1 1 * * * /usr/sbin/ntpdate -s time-1.ncsu.edu
ntupdate is correctly installed, and in that location. So it's something about my crontab syntax I think - ideas?
centos centos6 cron centos7
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
CentOS 6.4 is happy with this, but CentOS 7 tells me "errors in crontab file, can't install.". What's wrong with this crontab file (just the 2 lines)?
0 0 * * * /home/web/backup-db.sh
0 1 * * * /home/web/backup-files.sh
I've tried this based on this answer here, this doesn't work either:
every '0 0 * * *' do /home/web/backup-db.sh
every '0 1 * * *' do /home/web/backup-files.sh
It's not permissions on those files, because this doesn't work either:
1 1 * * * /usr/sbin/ntpdate -s time-1.ncsu.edu
ntupdate is correctly installed, and in that location. So it's something about my crontab syntax I think - ideas?
centos centos6 cron centos7
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Please explain what you did when trying to install the file (also theevery ....from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.
– Sven♦
Aug 12 '17 at 18:01
If you open in the crontab in vim and do:set listare there any unexpected hidden characters, like carriage-returns?
– shearn89
Aug 14 '17 at 10:09
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19
add a comment |
CentOS 6.4 is happy with this, but CentOS 7 tells me "errors in crontab file, can't install.". What's wrong with this crontab file (just the 2 lines)?
0 0 * * * /home/web/backup-db.sh
0 1 * * * /home/web/backup-files.sh
I've tried this based on this answer here, this doesn't work either:
every '0 0 * * *' do /home/web/backup-db.sh
every '0 1 * * *' do /home/web/backup-files.sh
It's not permissions on those files, because this doesn't work either:
1 1 * * * /usr/sbin/ntpdate -s time-1.ncsu.edu
ntupdate is correctly installed, and in that location. So it's something about my crontab syntax I think - ideas?
centos centos6 cron centos7
CentOS 6.4 is happy with this, but CentOS 7 tells me "errors in crontab file, can't install.". What's wrong with this crontab file (just the 2 lines)?
0 0 * * * /home/web/backup-db.sh
0 1 * * * /home/web/backup-files.sh
I've tried this based on this answer here, this doesn't work either:
every '0 0 * * *' do /home/web/backup-db.sh
every '0 1 * * *' do /home/web/backup-files.sh
It's not permissions on those files, because this doesn't work either:
1 1 * * * /usr/sbin/ntpdate -s time-1.ncsu.edu
ntupdate is correctly installed, and in that location. So it's something about my crontab syntax I think - ideas?
centos centos6 cron centos7
centos centos6 cron centos7
asked Aug 12 '17 at 17:01
user2044774user2044774
31137
31137
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Please explain what you did when trying to install the file (also theevery ....from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.
– Sven♦
Aug 12 '17 at 18:01
If you open in the crontab in vim and do:set listare there any unexpected hidden characters, like carriage-returns?
– shearn89
Aug 14 '17 at 10:09
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19
add a comment |
1
Please explain what you did when trying to install the file (also theevery ....from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.
– Sven♦
Aug 12 '17 at 18:01
If you open in the crontab in vim and do:set listare there any unexpected hidden characters, like carriage-returns?
– shearn89
Aug 14 '17 at 10:09
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19
1
1
Please explain what you did when trying to install the file (also the
every .... from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.– Sven♦
Aug 12 '17 at 18:01
Please explain what you did when trying to install the file (also the
every .... from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.– Sven♦
Aug 12 '17 at 18:01
If you open in the crontab in vim and do
:set list are there any unexpected hidden characters, like carriage-returns?– shearn89
Aug 14 '17 at 10:09
If you open in the crontab in vim and do
:set list are there any unexpected hidden characters, like carriage-returns?– shearn89
Aug 14 '17 at 10:09
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19
add a comment |
2 Answers
2
active
oldest
votes
If this is /etc/crontab, you're missing a username in there.
Try this:
0 0 * * * root /home/web/backup-db.sh
0 1 * * * root /home/web/backup-files.sh
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
add a comment |
Adding a # on a single line at the end of the file fixed it. It was a premature EOF issue.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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/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%2fserverfault.com%2fquestions%2f868332%2ferrors-in-crontab-file-cant-install-only-on-centos-7-not-centos-6-4%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
If this is /etc/crontab, you're missing a username in there.
Try this:
0 0 * * * root /home/web/backup-db.sh
0 1 * * * root /home/web/backup-files.sh
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
add a comment |
If this is /etc/crontab, you're missing a username in there.
Try this:
0 0 * * * root /home/web/backup-db.sh
0 1 * * * root /home/web/backup-files.sh
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
add a comment |
If this is /etc/crontab, you're missing a username in there.
Try this:
0 0 * * * root /home/web/backup-db.sh
0 1 * * * root /home/web/backup-files.sh
If this is /etc/crontab, you're missing a username in there.
Try this:
0 0 * * * root /home/web/backup-db.sh
0 1 * * * root /home/web/backup-files.sh
answered Aug 12 '17 at 19:30
toppledwagontoppledwagon
3,8601514
3,8601514
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
add a comment |
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
I tried that, didn't work.
– user2044774
Aug 13 '17 at 1:10
add a comment |
Adding a # on a single line at the end of the file fixed it. It was a premature EOF issue.
add a comment |
Adding a # on a single line at the end of the file fixed it. It was a premature EOF issue.
add a comment |
Adding a # on a single line at the end of the file fixed it. It was a premature EOF issue.
Adding a # on a single line at the end of the file fixed it. It was a premature EOF issue.
answered Sep 1 '17 at 19:14
user2044774user2044774
31137
31137
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f868332%2ferrors-in-crontab-file-cant-install-only-on-centos-7-not-centos-6-4%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
1
Please explain what you did when trying to install the file (also the
every ....from the answer you linked is valid only in the context of that ruby script, it's not valid syntax for a crontab.– Sven♦
Aug 12 '17 at 18:01
If you open in the crontab in vim and do
:set listare there any unexpected hidden characters, like carriage-returns?– shearn89
Aug 14 '17 at 10:09
@Sven - good to know that that middle block is ruby. The other blocks I've tried I've just installed by saving the file - ie.., 'crontab -e' to edit crontab, save. I'm using emacs to edit the file.
– user2044774
Aug 14 '17 at 17:19
@shearn89, No unexpected hidden characters.
– user2044774
Aug 14 '17 at 17:19