NOT WORK! syntax error, unexpected * (SyntaxError)
Any suggestion??
Originally created by @marcosomma on GitHub (May 18, 2015).
Hi there,
So I need execute a job each hour, each 15 minutes exactly, independent from the deploy hour.
It's the first time that I use this GEM and it's my first app in Ruby :)
In node.js my code to do this is
```
var job = new CronJob('0 */15 * * * *', function () {
do something....
}, null, true, "");
```
I try 2 different approach
<b>1) every hours at : 00/15/30/45 </b>
```
Crono.perform(myJob).every 1.hours, at: {min:00}
Crono.perform(myJob).every 1.hours, at: {min:15}
Crono.perform(myJob).every 1.hours, at: {min:30}
Crono.perform(myJob).every 1.hours, at: {min:45}
```
NOT WORK! period should be at least 1 day to use 'at'
<b>2) every days each hours at : 00/15/30/45 </b>
```
Crono.perform(myJob).every 1.day, at: {hour: *, min:00}
Crono.perform(myJob).every 1.day, at: {hour: *, min:15}
Crono.perform(myJob).every 1.day, at: {hour: *, min:30}
Crono.perform(myJob).every 1.day, at: {hour: *, min:45}
```
NOT WORK! syntax error, unexpected \* (SyntaxError)
Any suggestion??
adam
added the bug label 2025-12-29 00:21:18 +01:00
@plashchynski commented on GitHub (May 28, 2015):
@marcosomma Thank you for the report. Now you can setup it as:
``` ruby
Crono.perform(myJob).every 1.hours, at: {min:00}
Crono.perform(myJob).every 1.hours, at: {min:15}
Crono.perform(myJob).every 1.hours, at: {min:30}
Crono.perform(myJob).every 1.hours, at: {min:45}
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @marcosomma on GitHub (May 18, 2015).
Hi there,
So I need execute a job each hour, each 15 minutes exactly, independent from the deploy hour.
It's the first time that I use this GEM and it's my first app in Ruby :)
In node.js my code to do this is
I try 2 different approach
1) every hours at : 00/15/30/45
NOT WORK! period should be at least 1 day to use 'at'
2) every days each hours at : 00/15/30/45
NOT WORK! syntax error, unexpected * (SyntaxError)
Any suggestion??
@plashchynski commented on GitHub (May 28, 2015):
@marcosomma Thank you for the report. Now you can setup it as:
@marcosomma commented on GitHub (Jun 3, 2015):
Thanks!