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.










share|improve this question
























  • 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















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.










share|improve this question
























  • 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













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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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










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





share|improve this answer





















  • 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


















up vote
0
down vote













Make very sure the crontab file is terminated with a char.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });














    draft saved

    draft discarded


















    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

























    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





    share|improve this answer





















    • 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















    up vote
    0
    down vote



    accepted










    Try the following:



    30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail





    share|improve this answer





















    • 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













    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





    share|improve this answer












    Try the following:



    30 20 * * * /usr/bin/php /www/wwwroot/easy_xyz/xcat sendDiaryMail






    share|improve this answer












    share|improve this answer



    share|improve this answer










    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


















    • 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












    up vote
    0
    down vote













    Make very sure the crontab file is terminated with a char.






    share|improve this answer

























      up vote
      0
      down vote













      Make very sure the crontab file is terminated with a char.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Make very sure the crontab file is terminated with a char.






        share|improve this answer












        Make very sure the crontab file is terminated with a char.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        RudiC

        3,7581312




        3,7581312






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt