Cron Job in symfony2

后端 未结 4 2082
爱一瞬间的悲伤
爱一瞬间的悲伤 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:49

    I think this is a good question.

    I recently did some work (using ZF1 components, not full MVC) where all kinds of hidden dependencies existed on cron jobs to perform tasks, and I had to spend much time adding comments and creating documentation to warn anyone coming after me what these crons existed, what they did, where they were stored and so on.

    It never dawned on me that there would be a ZF component just for that purpose, lots of dependencies on controllers though...

    Sorry I'm not answering your direct question though.

    FWIW

提交回复
热议问题