Crontab error with php sendDiaryMail
up vote
0
down vote
favorite
I add the
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
line in my crontab -e
to like this:
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
55 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
but get error:
crontab: installing new crontab
"/tmp/crontab.d7MGaW":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
where is the issue, I did not find it.
centos cron
add a comment |
up vote
0
down vote
favorite
I add the
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
line in my crontab -e
to like this:
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
55 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
but get error:
crontab: installing new crontab
"/tmp/crontab.d7MGaW":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
where is the issue, I did not find it.
centos cron
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
1
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
1
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I add the
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
line in my crontab -e
to like this:
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
55 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
but get error:
crontab: installing new crontab
"/tmp/crontab.d7MGaW":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
where is the issue, I did not find it.
centos cron
I add the
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
line in my crontab -e
to like this:
30 22 * * * php /www/wwwroot/easy_xyz/xcat sendDiaryMail
55 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
but get error:
crontab: installing new crontab
"/tmp/crontab.d7MGaW":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
where is the issue, I did not find it.
centos cron
centos cron
edited 2 days ago
justinnoor.io
340218
340218
asked 2 days ago
26334_zeal
31
31
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
1
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
1
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago
add a comment |
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
1
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
1
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
1
1
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
1
1
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
Try the following:
30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
add a comment |
up vote
0
down vote
Make very sure the crontab
file is terminated with a char.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try the following:
30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
add a comment |
up vote
0
down vote
accepted
Try the following:
30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try the following:
30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail
Try the following:
30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail
answered 2 days ago
cherrysoft
52156
52156
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
add a comment |
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
this works, why?
– 26334_zeal
2 days ago
this works, why?
– 26334_zeal
2 days ago
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
Because the user running the cron job needs to have /usr/bin/php in their path.
– cherrysoft
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
the php have the path environment there, I think this is because of the other format, because I copy from the Mac text editor.
– 26334_zeal
yesterday
add a comment |
up vote
0
down vote
Make very sure the crontab
file is terminated with a char.
add a comment |
up vote
0
down vote
Make very sure the crontab
file is terminated with a char.
add a comment |
up vote
0
down vote
up vote
0
down vote
Make very sure the crontab
file is terminated with a char.
Make very sure the crontab
file is terminated with a char.
answered 2 days ago
RudiC
3,7581312
3,7581312
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f486954%2fcrontab-error-with-php-senddiarymail%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
Maybe you write wrong character at the benning of line, open crontab again and check (this can happen if you copy and paste )
– Skamasle
2 days ago
there is no wrong character.
– 26334_zeal
2 days ago
1
Try removing the line and write it by your hand at the end of file and not copy / paste, you may see it more clear.
– Skamasle
2 days ago
1
Avoid copy and pasting from web pages
– Rui F Ribeiro
2 days ago
Even copied & pasted out of your post the line gets happily used on my box?
– tink
2 days ago