Comments (9)
Verified [email protected] is working with timezone: 'America/Anchorage'
Thanks!
from croner.
@victorird Oh, thanks for reporting this! Released a potential hot fix in
[email protected]
(channelcroner@legacy-node-support
), where i added the following code as a quick workaround for AKDT and AKST not being supported by Date.parse():// Convert non-supported timezones // - Hotfix for AKST and AKDT 7.0-branch of Croner, fixed for real in 8.0 tz = tz.replace("AKST","-0900").replace("AKDT","-0800");Hacky, but i hope it should do for those who cannot go to
8.x
. Please let me know if this works for you, and i'll release7.0.6
stable.
Thanks for the quick hot fix. I tested it and it's working flawlessly!
from croner.
Interersting, can confirm this happens with multiple timezones resolving to AKDT.
from croner.
@jefbarn Please check if upgrading to [email protected]
resolves this issue.
from croner.
Released in stable channel through 8.0.0
from croner.
Thanks for the fix @Hexagon . However I tried the 7.0.6-dev.0 branch with Node.js 16 and it throws the following error:
RangeError: Value shortOffset out of range for Date.prototype.toLocaleString options property timeZoneName
at Date.toLocaleString (<anonymous>)
at getTimezoneOffset (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:1284)
at Function.minitz.fromTZ (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:359)
at minitz (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:75)
at CronDate.getDate (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:17226)
at CronDate.getTime (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:17361)
at Cron.msToNext (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:20340)
at Cron.schedule (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:20975)
at new Cron (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:19159)
at Cron (/home/vagrant/projects/itheia-app/api/node_modules/croner/dist/croner.min.cjs:1:17825)
I'm guessing the syntax in 7.0.6-dev.0 is only supported for Node.js >= 18. We're unable to move to Node.js 18 at the moment due to hardware vendor limitation. Is there any chance you can make this bugfix work with Node.js 16? Thx again.
from croner.
@victorird Oh, thanks for reporting this! Released a potential hot fix in [email protected]
(channel croner@legacy-node-support
), where i added the following code as a quick workaround for AKDT and AKST not being supported by Date.parse():
// Convert non-supported timezones
// - Hotfix for AKST and AKDT 7.0-branch of Croner, fixed for real in 8.0
tz = tz.replace("AKST","-0900").replace("AKDT","-0800");
Hacky, but i hope it should do for those who cannot go to 8.x
. Please let me know if this works for you, and i'll release 7.0.6
stable.
from croner.
Nice! Added support for AST and released [email protected]
, will let this version linger for a while before releasing the stable version.
from croner.
Resolved in the 7.x branch through 7.0.7
from croner.
Related Issues (20)
- Cron runs every second instead of every 5 minutes. HOT 1
- Cron Job doesn't run correctly HOT 3
- L5,6 Day of the Week is not working correctly - L is not a number HOT 5
- Croner returns different values in case of trailing whitespace HOT 2
- Race HOT 4
- Fix and add the examples links HOT 1
- Request: Last day minus X HOT 1
- Bug: Increment not work as I expected HOT 3
- previousRun and currentRun return null all the time HOT 5
- Using */59 * * * * * make run function twice HOT 1
- Support for modulo operator
- Specific timezones cause high CPU load on UNIX systems using croner <= 7.x HOT 10
- Storing job constant in mongo Db results in error HOT 1
- [Feature Request]: A way to stop all scheduled jobs, but wait for running jobs to complete HOT 2
- Job won't run when scheduled with America/Anchorage time zone HOT 1
- Events Feature request HOT 1
- Allow update HOT 1
- using utcOffset throws error: Invalid time zone specified HOT 2
- [Bug] `interval` setting does seem to ignore `startAt` HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from croner.