Cron Job in symfony2

后端 未结 4 2039
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 06:52

I create a console command in my project. I want it to be executed everyday at 7 p.m. How could i do it in symfony2? A basic php cron job way or symfony2 have something more con

4条回答
  •  时光取名叫无心
    2021-02-01 07:51

    You can just set a cron in crontab to execute your symfony command,

    e.g.

    0 19 * * * /var/www/symfony/app/console YOUR_COMMAND

提交回复
热议问题