profile
viewpoint

kelektiv/node-cron 7743

Cron for NodeJS.

kelektiv/node.bcrypt.js 6826

bcrypt for NodeJs

startedkelektiv/node-cron

started time in 3 hours

startedkelektiv/node.bcrypt.js

started time in 4 hours

startedkelektiv/node-cron

started time in 6 hours

issue commentkelektiv/node-cron

Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

Hello @intcreator,

Our other CronJobs are working properly with version ^1.8.2, then why does one CronJob has a version issue which I have added yesterday in my code?

And if I upgrade the version of the "cron" package then will there be any issue on previous CronJobs?

shoaifmansuri19

comment created time in 17 hours

startedkelektiv/node.bcrypt.js

started time in a day

issue commentkelektiv/node-cron

cron fails on two servers, approximately same time, without error

FindJob function finds jobs from DB and executive IO intensive task, it may take less than a second or may take up to one minute, code also contains time intervals, callbacks etc

ChristophDFine

comment created time in a day

pull request commentkelektiv/node-cron

Eslint update to latest + lint fixes

thanks! would you mind explaining the changes to .eslintrc?

tudorbarbu

comment created time in a day

issue commentkelektiv/node-cron

[BUG] Setting runOnInit executes onTick with false start

I do think it's kind of confusing but runOnInit runs the function when the cron job is initalized which is a different moment from when it is started.

import { CronJob } from "cron";

const job = new CronJob({
    cronTime: "* * * * *",
    onTick: () => console.log("Tick"),
    runOnInit: true,
    startNow: false,
});
// should see "Tick" once in the console even though job has not started

once you start the job you should see "Tick" in the console every second. does that make sense?

frbuceta

comment created time in a day

issue closedkelektiv/node-cron

Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

Hello,

I'm getting an error in CronJob that "cron reached maximum iterations" & It says that provides the below error & create an issue. Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

cron version : ^1.8.2 Kindly help to resolve this issue.

closed time in a day

shoaifmansuri19

issue commentkelektiv/node-cron

Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

you're using an outdated version of node-cron. please upgrade to the latest version and if this error persists refer to the canonical issue #467.

closing this as a duplicate

shoaifmansuri19

comment created time in a day

startedkelektiv/node-cron

started time in a day

startedkelektiv/node.bcrypt.js

started time in 2 days

issue openedkelektiv/node-cron

Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

Hello,

I'm getting an error in CronJob that "cron reached maximum iterations" & It says that provides the below error & create an issue. Time Zone: "" - Cron String: 0 * * * * * - UTC offset: +05:30 - current Date: Mon Mar 27 2023 09:39:02 GMT+0530

Kindly help to resolve this issue.

created time in 2 days

startedkelektiv/node-cron

started time in 2 days

startedkelektiv/node-cron

started time in 2 days

issue commentkelektiv/node-cron

cron fails on two servers, approximately same time, without error

@awaismehmood88 I'm trying to reproduce your issue. what does the findJob function do? I use this library for processes that run for months without stopping so it must only happen under specific circumstances

ChristophDFine

comment created time in 2 days

issue commentkelektiv/node-cron

Error: Something went wrong. cron reached maximum iterations.

@toume what exactly was it that you commented that solved the issue? we just added some time change fixes in 2.3.0 so if nestjs can update maybe that will fix some issues. otherwise if you can duplicate it with a test that would be much appreciated!

shivam-postman

comment created time in 2 days

startedkelektiv/node.bcrypt.js

started time in 2 days

startedkelektiv/node.bcrypt.js

started time in 3 days

issue commentkelektiv/node-cron

Error: Something went wrong. cron reached maximum iterations.

We just add this issue overnight with code both in prod and that could be reproduced in local. The same code was running fine previously. Commenting one the call solved the issue.

(note: we are using "@nestjs/schedule": "^2.2.0" which is using "cron": "2.2.0")

shivam-postman

comment created time in 3 days

startedkelektiv/node.bcrypt.js

started time in 3 days

startedkelektiv/node.bcrypt.js

started time in 4 days

startedkelektiv/node-cron

started time in 4 days

issue commentkelektiv/node-cron

[BUG] Setting runOnInit executes onTick with false start

actually when I run the code example you provided it only runs once for me. what are you expecting runOnInit to do?

For "on init" we understand "on start" but if the cron didn't start yet I think the cron must not run.

How else can I achieve that behavior?

frbuceta

comment created time in 4 days

startedkelektiv/node-cron

started time in 4 days

issue commentkelektiv/node-cron

onTick may call onComplete at the end of each run. How?

@intcreator Thank you, I am good. I should have closed.

jeff00seattle

comment created time in 4 days

startedkelektiv/node.bcrypt.js

started time in 4 days

startedkelektiv/node.bcrypt.js

started time in 4 days

startedkelektiv/node-cron

started time in 5 days

more