Page 1 of 1
Unable to create unix socket when running in crontab
Posted: 21 Jan 2010 16:27
by amit_online
I have a php script which runs from the command line and uses vlc to get radio station info. It uses a local unix socket to communicate with the calling php file. Everything runs fine if I run it from the command prompt. But if I run it as crontab job then its unable to create the local unix socket and crashes.
Any solutions are welcome.
Thanks in advance.
Re: Unable to create unix socket when running in crontab
Posted: 21 Jan 2010 17:09
by Rémi Denis-Courmont
Usually, this means you are not using the same user's crontab, or some environment variable is missing, or you use the RC interface (which requires a TTY).
Re: Unable to create unix socket when running in crontab
Posted: 21 Jan 2010 18:43
by xtophe
--rc-fake-tty if you're in the last case
Re: Unable to create unix socket when running in crontab
Posted: 22 Jan 2010 06:09
by amit_online
That is right. I am running vlc with rc --rc-unix . Is there a way to run this in cron mode?
Re: Unable to create unix socket when running in crontab
Posted: 23 Jan 2010 09:30
by Rémi Denis-Courmont
Are you trying to play Jeopardy! ? Xtophe just gave the answer.