How to fix “Bad minute” error while installing a new crontab
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've installed a fresh Ubuntu 16.04 to replace my Windows OS.
I'm trying to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully installed (both ampps and magento) and it's running well.
I'm trying to setup a crontab but it seems there is an error on the first line second 25.
This is what I'm trying to add in to the crontab for the Ampps user, using the command sudo crontab -e -u ampps
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/update/cron.php >> /usr/local/ampps/www/localshop.dev.dev/var/log/update.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev.dev/bin/magento setup:cron:run >> /usr/local/ampps/www/localshop.dev.dev/var/log/setup.cron.log
What am I doing wrong?
I followed an error message in magento 2.1 admin that referred to this troubleshoot link for the version 2.0
and to this configuration guide
cron
add a comment |
I've installed a fresh Ubuntu 16.04 to replace my Windows OS.
I'm trying to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully installed (both ampps and magento) and it's running well.
I'm trying to setup a crontab but it seems there is an error on the first line second 25.
This is what I'm trying to add in to the crontab for the Ampps user, using the command sudo crontab -e -u ampps
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/update/cron.php >> /usr/local/ampps/www/localshop.dev.dev/var/log/update.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev.dev/bin/magento setup:cron:run >> /usr/local/ampps/www/localshop.dev.dev/var/log/setup.cron.log
What am I doing wrong?
I followed an error message in magento 2.1 admin that referred to this troubleshoot link for the version 2.0
and to this configuration guide
cron
2
First glance: you may have lines which have no* * * * *
socron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between/usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?
– Thomas Ward♦
Jul 10 '16 at 15:50
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposedcrontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?
– Cbhihe
Jul 12 '16 at 6:32
1
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56
add a comment |
I've installed a fresh Ubuntu 16.04 to replace my Windows OS.
I'm trying to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully installed (both ampps and magento) and it's running well.
I'm trying to setup a crontab but it seems there is an error on the first line second 25.
This is what I'm trying to add in to the crontab for the Ampps user, using the command sudo crontab -e -u ampps
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/update/cron.php >> /usr/local/ampps/www/localshop.dev.dev/var/log/update.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev.dev/bin/magento setup:cron:run >> /usr/local/ampps/www/localshop.dev.dev/var/log/setup.cron.log
What am I doing wrong?
I followed an error message in magento 2.1 admin that referred to this troubleshoot link for the version 2.0
and to this configuration guide
cron
I've installed a fresh Ubuntu 16.04 to replace my Windows OS.
I'm trying to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully installed (both ampps and magento) and it's running well.
I'm trying to setup a crontab but it seems there is an error on the first line second 25.
This is what I'm trying to add in to the crontab for the Ampps user, using the command sudo crontab -e -u ampps
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev/update/cron.php >> /usr/local/ampps/www/localshop.dev.dev/var/log/update.cron.log
* * * * * /usr/local/ampps/php-5.6/etc
/usr/local/ampps/www/localshop.dev.dev/bin/magento setup:cron:run >> /usr/local/ampps/www/localshop.dev.dev/var/log/setup.cron.log
What am I doing wrong?
I followed an error message in magento 2.1 admin that referred to this troubleshoot link for the version 2.0
and to this configuration guide
cron
cron
edited Sep 1 '17 at 10:29
Zanna
51.4k13140243
51.4k13140243
asked Jul 10 '16 at 15:40
user564658user564658
43115
43115
2
First glance: you may have lines which have no* * * * *
socron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between/usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?
– Thomas Ward♦
Jul 10 '16 at 15:50
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposedcrontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?
– Cbhihe
Jul 12 '16 at 6:32
1
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56
add a comment |
2
First glance: you may have lines which have no* * * * *
socron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between/usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?
– Thomas Ward♦
Jul 10 '16 at 15:50
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposedcrontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?
– Cbhihe
Jul 12 '16 at 6:32
1
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56
2
2
First glance: you may have lines which have no
* * * * *
so cron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between /usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?– Thomas Ward♦
Jul 10 '16 at 15:50
First glance: you may have lines which have no
* * * * *
so cron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between /usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?– Thomas Ward♦
Jul 10 '16 at 15:50
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposed
crontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?– Cbhihe
Jul 12 '16 at 6:32
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposed
crontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?– Cbhihe
Jul 12 '16 at 6:32
1
1
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56
add a comment |
5 Answers
5
active
oldest
votes
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
Min Hour Day Month DayOfWeek Command
So, to run command
at 10:15 every Sunday, you'd do:
15 10 * * 0 command
I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
* * * * * /usr/local/ampps/php-5.6/etc
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.
add a comment |
From my previous experience, it was due to a CR/LF character before the first cron line (since it was edited from Windows not Linux directly).
I noticed and removed that char from a HEX editor.
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
add a comment |
This kind of error may also occur if you are trying to reset cron variables to empty values like this:
MAILTO=me@example.com
* * * * * do some stuff with error reporting
MAILTO=
* * * * * do another stuff too verbose to receive emails
Note the empty line after MAILTO=
at line 3. This will result in the message:
crontab: installing new crontab
"/tmp/crontab.AvDwzo":3: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
The correct way to reset MAILTO
variable is to use empty quotes, like this:
MAILTO=''
Hope this helps.
add a comment |
The following command fixed my problem with this issue
perl -pi -e 's|rn|n|' /var/spool/cron/root
The problem was that Windows line separators (CRLF) were upsetting the Linux based cron. Changing the separators to be Linux line separators (LF) fixed the problem.
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
add a comment |
In my case (and it seems to be OP's case as well), the issue was that I had a new line in the command to be executed, something like this
5 0 * * * some_command -some_param
-another_param
The overflowing line was of course interpreted as a new cron entry, and cron rightfully complained that the start of that line was not a valid minute identifier.
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',
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%2faskubuntu.com%2fquestions%2f797047%2fhow-to-fix-bad-minute-error-while-installing-a-new-crontab%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
Min Hour Day Month DayOfWeek Command
So, to run command
at 10:15 every Sunday, you'd do:
15 10 * * 0 command
I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
* * * * * /usr/local/ampps/php-5.6/etc
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.
add a comment |
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
Min Hour Day Month DayOfWeek Command
So, to run command
at 10:15 every Sunday, you'd do:
15 10 * * 0 command
I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
* * * * * /usr/local/ampps/php-5.6/etc
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.
add a comment |
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
Min Hour Day Month DayOfWeek Command
So, to run command
at 10:15 every Sunday, you'd do:
15 10 * * 0 command
I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
* * * * * /usr/local/ampps/php-5.6/etc
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.
Each crontab line must start with a time at which the command should be run and then the command. The general format is:
Min Hour Day Month DayOfWeek Command
So, to run command
at 10:15 every Sunday, you'd do:
15 10 * * 0 command
I'm not sure what your commands are, but you have lines that don't start with a time definition. I don't understand what lines like this are:
* * * * * /usr/local/ampps/php-5.6/etc
That's a time but no command. You're giving it a directory. And lines like this have commands but no time:
/usr/local/ampps/www/localshop.dev/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /usr/local/ampps/www/localshop.dev/var/log/magento.cron.log
So, make sure you follow the format and you should be fine. If this is not clear, edit your question and explain what commands you are trying to run.
edited Aug 9 '16 at 23:40
user564658
43115
43115
answered Jul 10 '16 at 16:48
terdon♦terdon
67.9k13140223
67.9k13140223
add a comment |
add a comment |
From my previous experience, it was due to a CR/LF character before the first cron line (since it was edited from Windows not Linux directly).
I noticed and removed that char from a HEX editor.
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
add a comment |
From my previous experience, it was due to a CR/LF character before the first cron line (since it was edited from Windows not Linux directly).
I noticed and removed that char from a HEX editor.
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
add a comment |
From my previous experience, it was due to a CR/LF character before the first cron line (since it was edited from Windows not Linux directly).
I noticed and removed that char from a HEX editor.
From my previous experience, it was due to a CR/LF character before the first cron line (since it was edited from Windows not Linux directly).
I noticed and removed that char from a HEX editor.
edited Apr 15 '18 at 18:15
answered Jul 27 '17 at 16:25
robregonmrobregonm
1214
1214
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
add a comment |
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
3
3
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
You should expand on your answer with more details.
– WinEunuuchs2Unix
Jul 28 '17 at 2:28
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
If you see '-':1: bad minute, the - is /l. Linux uses LF while windows uses CR/LF. In other words, it would be trying to read the /l character as the first character of the command instead of being part of the new line character.
– Erick Stone
Jan 7 at 21:31
add a comment |
This kind of error may also occur if you are trying to reset cron variables to empty values like this:
MAILTO=me@example.com
* * * * * do some stuff with error reporting
MAILTO=
* * * * * do another stuff too verbose to receive emails
Note the empty line after MAILTO=
at line 3. This will result in the message:
crontab: installing new crontab
"/tmp/crontab.AvDwzo":3: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
The correct way to reset MAILTO
variable is to use empty quotes, like this:
MAILTO=''
Hope this helps.
add a comment |
This kind of error may also occur if you are trying to reset cron variables to empty values like this:
MAILTO=me@example.com
* * * * * do some stuff with error reporting
MAILTO=
* * * * * do another stuff too verbose to receive emails
Note the empty line after MAILTO=
at line 3. This will result in the message:
crontab: installing new crontab
"/tmp/crontab.AvDwzo":3: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
The correct way to reset MAILTO
variable is to use empty quotes, like this:
MAILTO=''
Hope this helps.
add a comment |
This kind of error may also occur if you are trying to reset cron variables to empty values like this:
MAILTO=me@example.com
* * * * * do some stuff with error reporting
MAILTO=
* * * * * do another stuff too verbose to receive emails
Note the empty line after MAILTO=
at line 3. This will result in the message:
crontab: installing new crontab
"/tmp/crontab.AvDwzo":3: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
The correct way to reset MAILTO
variable is to use empty quotes, like this:
MAILTO=''
Hope this helps.
This kind of error may also occur if you are trying to reset cron variables to empty values like this:
MAILTO=me@example.com
* * * * * do some stuff with error reporting
MAILTO=
* * * * * do another stuff too verbose to receive emails
Note the empty line after MAILTO=
at line 3. This will result in the message:
crontab: installing new crontab
"/tmp/crontab.AvDwzo":3: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
The correct way to reset MAILTO
variable is to use empty quotes, like this:
MAILTO=''
Hope this helps.
edited Sep 1 '17 at 10:27
Zanna
51.4k13140243
51.4k13140243
answered Sep 1 '17 at 10:16
ob-ivanob-ivan
1112
1112
add a comment |
add a comment |
The following command fixed my problem with this issue
perl -pi -e 's|rn|n|' /var/spool/cron/root
The problem was that Windows line separators (CRLF) were upsetting the Linux based cron. Changing the separators to be Linux line separators (LF) fixed the problem.
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
add a comment |
The following command fixed my problem with this issue
perl -pi -e 's|rn|n|' /var/spool/cron/root
The problem was that Windows line separators (CRLF) were upsetting the Linux based cron. Changing the separators to be Linux line separators (LF) fixed the problem.
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
add a comment |
The following command fixed my problem with this issue
perl -pi -e 's|rn|n|' /var/spool/cron/root
The problem was that Windows line separators (CRLF) were upsetting the Linux based cron. Changing the separators to be Linux line separators (LF) fixed the problem.
The following command fixed my problem with this issue
perl -pi -e 's|rn|n|' /var/spool/cron/root
The problem was that Windows line separators (CRLF) were upsetting the Linux based cron. Changing the separators to be Linux line separators (LF) fixed the problem.
edited Jul 31 '18 at 5:54
pomsky
33.7k11105138
33.7k11105138
answered Jul 31 '18 at 5:36
Derek HazellDerek Hazell
1
1
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
add a comment |
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
I tried this, it deleted the content of my crontab
– bokan
Dec 6 '18 at 12:45
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
It happend because the drive was full
– bokan
Dec 6 '18 at 14:54
add a comment |
In my case (and it seems to be OP's case as well), the issue was that I had a new line in the command to be executed, something like this
5 0 * * * some_command -some_param
-another_param
The overflowing line was of course interpreted as a new cron entry, and cron rightfully complained that the start of that line was not a valid minute identifier.
add a comment |
In my case (and it seems to be OP's case as well), the issue was that I had a new line in the command to be executed, something like this
5 0 * * * some_command -some_param
-another_param
The overflowing line was of course interpreted as a new cron entry, and cron rightfully complained that the start of that line was not a valid minute identifier.
add a comment |
In my case (and it seems to be OP's case as well), the issue was that I had a new line in the command to be executed, something like this
5 0 * * * some_command -some_param
-another_param
The overflowing line was of course interpreted as a new cron entry, and cron rightfully complained that the start of that line was not a valid minute identifier.
In my case (and it seems to be OP's case as well), the issue was that I had a new line in the command to be executed, something like this
5 0 * * * some_command -some_param
-another_param
The overflowing line was of course interpreted as a new cron entry, and cron rightfully complained that the start of that line was not a valid minute identifier.
answered Mar 29 at 14:39
ZoltánZoltán
2501216
2501216
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.
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%2f797047%2fhow-to-fix-bad-minute-error-while-installing-a-new-crontab%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
First glance: you may have lines which have no
* * * * *
socron
can't interpret the items. Crontabs are line-break delimited to state "This task runs with the given configuration, and that task runs with a different one, etc.". Is this just a formatting screwup with your copy/paste or do the linebreaks actually exist between/usr/local/ampps/php-5.6/etc
and the rest of the lines as the code-formatting shows?– Thomas Ward♦
Jul 10 '16 at 15:50
Hey Thomas thanks about that, when you mentioned line break i did check the formating and it helped fix the crontab that has been now installed. I did also changed the format in 30 20 * * * and seems working now.
– user564658
Jul 10 '16 at 19:22
Hi, I understand the problem neither from yr post not from the given comments and answer. Have you modified yr post after receiving comments and perhaps after accepting the answer ? Comments and accepted answer both refer to errors in yr proposed
crontab
entries, that are either not there or not recognizable anymore. It's ok to correct a typo or a bad phrasing, but not an error if, in doing so, you take away the meaning of yr post. In that case yr readers cannot understand anymore what the prbm was. Am I wrong here ?– Cbhihe
Jul 12 '16 at 6:32
1
@Cbhihe thanks for your comment. Your are absolutely right, I did edit the post once received Thomas W. comment and terdon answer and the question doesn't make sense anymore now. Sorry about that. I'm going to copy back linebreakes into the question so it will make sense.
– user564658
Jul 12 '16 at 14:12
This error happends when the volume of crontab file is full.
– bokan
Dec 6 '18 at 14:56