Reputation: 321
I have created one worker dyno in Heroku app that is supposed to execute cakephp command on its run. See Procfile code below:-
worker: app/Console/cake opportunity
What is the default frequency of this worker dyno execution? I have checked heroku logs that shows the above worker process executed at some intervals as below:-
2016-04-06T11:13:34.557478+00:00 app[worker.1]:
2016-04-06T11:13:34.557497+00:00 app[worker.1]:
2016-04-06T11:13:34.570029+00:00 app[worker.1]: Path: /app/app/
2016-04-06T11:13:34.570041+00:00 app[worker.1]:
2016-04-06T11:13:34.616102+00:00 app[worker.1]: entered shell--
2016-04-06T11:13:35.208536+00:00 heroku[worker.1]: State changed from up to crashed
I need to execute the above worker dyno every minute. Do I need to use scheduler add-on for this in conjunction to the worker?
Upvotes: 1
Views: 332
Reputation: 321
What I have came to know after further implementation is that, the worker process is just like a "daemon" process running on linux. So basically the frequency of worker dyno run is just everytime.
The process that executes on worker should be formed such so as to create a loop with some specific delay after each run.
Upvotes: 1
Reputation: 6206
In cases where you need to use an specific frecuency, you must use the clock process type instead of worker
.
That way you can schedule jobs to be executed every minute.
Upvotes: 0