try: cd /path/to/my/app; /usr/bin/php symfony ... > /dev/null

you redirect to /dev/null - otherwise the output of your command gets
sent to you via e-mail.




On Nov 18, 10:54 am, hribo <[email protected]> wrote:
> hello,
> how do you create cron with existing task that i am usually running
> from CLI like this:
>
> php symfony email_service:sendLoggerEmailReturner --
> application=frontend --env=prod
>
> when i am on my production server, i run crontab -e command.
> then i am supposed to put there my cron, which i want ot run every
> night at 1 AM. syntax should be something like this, but it is not
> working:
>
> 0 1 * * * php symfony email_service:sendLoggerEmailReturner --
> application=frontend --env=prod > / dev/null
> ERROR: /bin/sh: /: Is a directory
>
> or
>
> 0 1 * * * cd /usr/bin/php cd /route/to/my/folder/symfony
> email_service:sendLoggerEmailReturner --application=frontend --
> env=prod > / dev/null
> ERROR: /bin/sh: line 0: cd: /usr/bin/php: Not a directory
>
> or other combinations. i am new to crontab so i am not sure what it
> is. i was also googling but nothing.
> one more question: why there must be : "dev/null" at the end?
>
> thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to