node-cron - Deprecation warning: imediateStart is deprecated and will be removed










0















I updated nodejs from 8 to 10.12 and receive that warning message.



D:BitBucketEA Studio>node index
DEPRECIATION: imediateStart is deprecated and will be removed soon in favor of the options param.
...


package.json



{
"dependencies":
...
"node-cron": "^2.0.3",



Usage:



"use strict";

const cron = require("node-cron");
cron.schedule("5 * * * *", () => null, false);


Any solutions?



Since I don't use imediateStart in my code, the warning origin must be within the internal code of the node-cron. Do the developers made that to not forget to update their own code? how much better would be to show: "This version of node-cron uses deprecated code. Please update it to version xxx as soon as it is released".










share|improve this question



















  • 1





    Google? First result: github.com/node-cron/node-cron/issues/100

    – robertklep
    Nov 12 '18 at 13:29











  • Yes, you are right. the warning comes from node-cron. I'll edit my question.

    – Miroslav Popov
    Nov 14 '18 at 6:59















0















I updated nodejs from 8 to 10.12 and receive that warning message.



D:BitBucketEA Studio>node index
DEPRECIATION: imediateStart is deprecated and will be removed soon in favor of the options param.
...


package.json



{
"dependencies":
...
"node-cron": "^2.0.3",



Usage:



"use strict";

const cron = require("node-cron");
cron.schedule("5 * * * *", () => null, false);


Any solutions?



Since I don't use imediateStart in my code, the warning origin must be within the internal code of the node-cron. Do the developers made that to not forget to update their own code? how much better would be to show: "This version of node-cron uses deprecated code. Please update it to version xxx as soon as it is released".










share|improve this question



















  • 1





    Google? First result: github.com/node-cron/node-cron/issues/100

    – robertklep
    Nov 12 '18 at 13:29











  • Yes, you are right. the warning comes from node-cron. I'll edit my question.

    – Miroslav Popov
    Nov 14 '18 at 6:59













0












0








0








I updated nodejs from 8 to 10.12 and receive that warning message.



D:BitBucketEA Studio>node index
DEPRECIATION: imediateStart is deprecated and will be removed soon in favor of the options param.
...


package.json



{
"dependencies":
...
"node-cron": "^2.0.3",



Usage:



"use strict";

const cron = require("node-cron");
cron.schedule("5 * * * *", () => null, false);


Any solutions?



Since I don't use imediateStart in my code, the warning origin must be within the internal code of the node-cron. Do the developers made that to not forget to update their own code? how much better would be to show: "This version of node-cron uses deprecated code. Please update it to version xxx as soon as it is released".










share|improve this question
















I updated nodejs from 8 to 10.12 and receive that warning message.



D:BitBucketEA Studio>node index
DEPRECIATION: imediateStart is deprecated and will be removed soon in favor of the options param.
...


package.json



{
"dependencies":
...
"node-cron": "^2.0.3",



Usage:



"use strict";

const cron = require("node-cron");
cron.schedule("5 * * * *", () => null, false);


Any solutions?



Since I don't use imediateStart in my code, the warning origin must be within the internal code of the node-cron. Do the developers made that to not forget to update their own code? how much better would be to show: "This version of node-cron uses deprecated code. Please update it to version xxx as soon as it is released".







node.js node-cron






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 7:03







Miroslav Popov

















asked Nov 12 '18 at 12:50









Miroslav PopovMiroslav Popov

1,2071834




1,2071834







  • 1





    Google? First result: github.com/node-cron/node-cron/issues/100

    – robertklep
    Nov 12 '18 at 13:29











  • Yes, you are right. the warning comes from node-cron. I'll edit my question.

    – Miroslav Popov
    Nov 14 '18 at 6:59












  • 1





    Google? First result: github.com/node-cron/node-cron/issues/100

    – robertklep
    Nov 12 '18 at 13:29











  • Yes, you are right. the warning comes from node-cron. I'll edit my question.

    – Miroslav Popov
    Nov 14 '18 at 6:59







1




1





Google? First result: github.com/node-cron/node-cron/issues/100

– robertklep
Nov 12 '18 at 13:29





Google? First result: github.com/node-cron/node-cron/issues/100

– robertklep
Nov 12 '18 at 13:29













Yes, you are right. the warning comes from node-cron. I'll edit my question.

– Miroslav Popov
Nov 14 '18 at 6:59





Yes, you are right. the warning comes from node-cron. I'll edit my question.

– Miroslav Popov
Nov 14 '18 at 6:59












2 Answers
2






active

oldest

votes


















2














Just replace



cron.schedule("5 * * * *", () => null, false);


with



cron.schedule("5 * * * *", () => null, scheduled:false);


From node-cron documentation on schedule method:




options Object: Optional configuration for job scheduling.



Options



scheduled: A boolean to set if the created task is schaduled. Default true;



timezone: The timezone that is used for job scheduling;







share|improve this answer






























    1














    Run the script with --trace-warnings flag. eg.: node --trace-warnings index.js. It will give you a detailed info what causes the warning.






    share|improve this answer























    • Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

      – Miroslav Popov
      Nov 14 '18 at 6:51










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262565%2fnode-cron-deprecation-warning-imediatestart-is-deprecated-and-will-be-removed%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









    2














    Just replace



    cron.schedule("5 * * * *", () => null, false);


    with



    cron.schedule("5 * * * *", () => null, scheduled:false);


    From node-cron documentation on schedule method:




    options Object: Optional configuration for job scheduling.



    Options



    scheduled: A boolean to set if the created task is schaduled. Default true;



    timezone: The timezone that is used for job scheduling;







    share|improve this answer



























      2














      Just replace



      cron.schedule("5 * * * *", () => null, false);


      with



      cron.schedule("5 * * * *", () => null, scheduled:false);


      From node-cron documentation on schedule method:




      options Object: Optional configuration for job scheduling.



      Options



      scheduled: A boolean to set if the created task is schaduled. Default true;



      timezone: The timezone that is used for job scheduling;







      share|improve this answer

























        2












        2








        2







        Just replace



        cron.schedule("5 * * * *", () => null, false);


        with



        cron.schedule("5 * * * *", () => null, scheduled:false);


        From node-cron documentation on schedule method:




        options Object: Optional configuration for job scheduling.



        Options



        scheduled: A boolean to set if the created task is schaduled. Default true;



        timezone: The timezone that is used for job scheduling;







        share|improve this answer













        Just replace



        cron.schedule("5 * * * *", () => null, false);


        with



        cron.schedule("5 * * * *", () => null, scheduled:false);


        From node-cron documentation on schedule method:




        options Object: Optional configuration for job scheduling.



        Options



        scheduled: A boolean to set if the created task is schaduled. Default true;



        timezone: The timezone that is used for job scheduling;








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 7:20









        Vasyl MoskalovVasyl Moskalov

        1,970815




        1,970815























            1














            Run the script with --trace-warnings flag. eg.: node --trace-warnings index.js. It will give you a detailed info what causes the warning.






            share|improve this answer























            • Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

              – Miroslav Popov
              Nov 14 '18 at 6:51















            1














            Run the script with --trace-warnings flag. eg.: node --trace-warnings index.js. It will give you a detailed info what causes the warning.






            share|improve this answer























            • Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

              – Miroslav Popov
              Nov 14 '18 at 6:51













            1












            1








            1







            Run the script with --trace-warnings flag. eg.: node --trace-warnings index.js. It will give you a detailed info what causes the warning.






            share|improve this answer













            Run the script with --trace-warnings flag. eg.: node --trace-warnings index.js. It will give you a detailed info what causes the warning.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 12 '18 at 13:24









            lependulependu

            694314




            694314












            • Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

              – Miroslav Popov
              Nov 14 '18 at 6:51

















            • Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

              – Miroslav Popov
              Nov 14 '18 at 6:51
















            Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

            – Miroslav Popov
            Nov 14 '18 at 6:51





            Thank you. Unfortunately nothing useful. I have the same deprecation warning message.

            – Miroslav Popov
            Nov 14 '18 at 6:51

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f53262565%2fnode-cron-deprecation-warning-imediatestart-is-deprecated-and-will-be-removed%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

            Use pre created SQLite database for Android project in kotlin

            Darth Vader #20

            Ondo