| View previous topic :: View next topic |
| Author |
Message |
HotHeap !BEWARE! Deletes post on answer
Reputation: 2
Joined: 06 Oct 2018 Posts: 4
|
Posted: Wed Dec 23, 2020 5:24 pm Post subject: |
|
|
This is lel JavaScript.
I would need to see CronJob otherwise;
Function resetNumSwipesDaily takes no arguments and is an arrow function initializing a new CronJob with a arguments of “0 1 * * * *”, async so when it’s complete it awaits a promise user.update and sets numswipes to 0, null, true, America/Chicago
mind you I don’t really code javascript but it’s easy to understand when u see all the code |
|
| Back to top |
|
 |
HotHeap !BEWARE! Deletes post on answer
Reputation: 2
Joined: 06 Oct 2018 Posts: 4
|
Posted: Thu Dec 24, 2020 2:55 pm Post subject: |
|
|
| t328163 wrote: | | tellopok529 wrote: | This is lel JavaScript.
I would need to see CronJob otherwise;
Function resetNumSwipesDaily takes no arguments and is an arrow function initializing a new CronJob with a arguments of “0 1 * * * *”, async so when it’s complete it awaits a promise user.update and sets numswipes to 0, null, true, America/Chicago
mind you I don’t really code javascript but it’s easy to understand when u see all the code |
You are so handsome.
edit: Cron is a language to define a scheduled time in a complex way, one of my github's project I was developing for a client as a freelance I needed a complex system that schedules jobs on a seperate thread, unfortunately cron libraries were too complicated for me so i found a nice library and very simple and straight forward that is called "FluentScheduler", which does the job but I only had to add a simple logic that checks when the duration is over to stop the subroutine. |
It isn’t that complicated when you read this
www.npmjs.com/package/cron |
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3326
|
Posted: Fri Dec 25, 2020 6:00 am Post subject: |
|
|
| t328163 wrote: | | Cron is a language to define a scheduled time in a complex way |
Nope.
Cron is coming from *nix.
It's not a language and it's not complex, either.
You should get your facts straight before you open your mouth because people will know you are full of shit before you finish your first sentence. |
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3326
|
Posted: Fri Dec 25, 2020 3:20 pm Post subject: |
|
|
| t328163 wrote: |
i've used "language" as a professional term for it, it can be described as anything, almost.
|
If you were a pro, you would know it's called syntax. |
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3326
|
Posted: Sat Dec 26, 2020 6:00 am Post subject: |
|
|
More or less anyone can get a PHD these days. It does not guarantee brain anymore.
Real pros will always use the same word - except when they are joking or drunk. |
|
| Back to top |
|
 |
|