3

I have a problem with cron task creating. I created the task, and its working just fine on my server if I run the following command:

php symfony namespace:taskname

At the crontab I use the following command:

usr/bin/php /home/user/mysite/symfony namespace:taskname

If I run this command, I only get the symfony commands list. In other words, it looks the same as if I type in just php symfony. Somehow the namespace:taskname part is not passed.

Any ideas?

Bond
  • 16,071
  • 6
  • 30
  • 53
  • I ask my system administrator with this issue, and he told me to use the following syntax in the crontab: `php-cli /home/user/mysite/symfony namespace:taskname` Now its working just fine :) – Tóth Arnold Aug 01 '15 at 13:28

1 Answers1

0

first you need to write syntax like

X X X X X  usr/bin/php /home/user/mysite/symfony namespace:taskname

where X X X X X is time period in which you want to run command . also set time according to your task completion time. it may overlap time.

still same problem then it may be your timezone is not ok in php.ini file. set your timezone in php.ini file.

pl_rock
  • 14,054
  • 3
  • 30
  • 33
  • Of course i made the syntax like that. I set it to run in every minute but nothing happens. The server is not mine, I dont think I can change anything in the php.ini. – Tóth Arnold Aug 01 '15 at 02:33
  • @Tóth Arnold , i am giving a link where most of problem of crontab is shared . go through http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work . check your crontab is ok and it may be your symfony command is not ok that i dont know more about symfony . – pl_rock Aug 01 '15 at 02:42