node-cron - Deprecation warning: imediateStart is deprecated and will be removed
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
add a comment |
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
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
add a comment |
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
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
node.js node-cron
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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;
add a comment |
Run the script with --trace-warnings
flag. eg.: node --trace-warnings index.js
. It will give you a detailed info what causes the warning.
Thank you. Unfortunately nothing useful. I have the same deprecation warning message.
– Miroslav Popov
Nov 14 '18 at 6:51
add a comment |
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
);
);
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%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
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;
add a comment |
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;
add a comment |
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;
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;
answered Nov 14 '18 at 7:20
Vasyl MoskalovVasyl Moskalov
1,970815
1,970815
add a comment |
add a comment |
Run the script with --trace-warnings
flag. eg.: node --trace-warnings index.js
. It will give you a detailed info what causes the warning.
Thank you. Unfortunately nothing useful. I have the same deprecation warning message.
– Miroslav Popov
Nov 14 '18 at 6:51
add a comment |
Run the script with --trace-warnings
flag. eg.: node --trace-warnings index.js
. It will give you a detailed info what causes the warning.
Thank you. Unfortunately nothing useful. I have the same deprecation warning message.
– Miroslav Popov
Nov 14 '18 at 6:51
add a comment |
Run the script with --trace-warnings
flag. eg.: node --trace-warnings index.js
. It will give you a detailed info what causes the warning.
Run the script with --trace-warnings
flag. eg.: node --trace-warnings index.js
. It will give you a detailed info what causes the warning.
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
add a comment |
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
add a comment |
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.
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%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
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
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