After reading all the articles I could not find a solution to my problem.
my Procfile looks like this.
web: play run --http.port=$PORT $PLAY_OPTS
worker: java -cp target/classes;target/dependency/* jobs.MyJob
I understand that since this is not a maven project classes and dependency directories dont exists.
But then, how shall I set the worker: java xxxx command
?
Are you annotating your Job classes? To start a job when Play starts, just do:
@OnApplicationStart
public class Bootstrap extends Job {
Or use the @Every or @On annotations:
@On("0 0 12 * * ?")
public class Bootstrap extends Job {
@Every("1h")
public class Bootstrap extends Job {