-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patiobar with cron #32
Comments
From a quick Google search, there's an env variable that needs to be set (which isn't set when cron jobs run). I am not too familiar with getting sound working with cron, so I can't give any more info than that to help. However, a workaround is to do something similar to what I do. I have a service that detects when my phone is connected to the network. If it's been an hour or more since the last connection, it'll trigger patiobar to start |
@K37V1N Yeah, I'd say this is almost certainly an env var issue, as @cph015 mentioned. From what I'm reading, you'll need to get the
And then set that in your crontab, something like: But let me ask, why are you running Patiobar in cron? I'm curious about your usecase. |
I'm doing this on a raspberry pi, and using Raspbian for the OS. I'm editing the cron with crontab -e, so I believe it's running with the default user of "Pi". User case is running music for animals in a shelter/adoption environment. I'm wanting to be able to turn on music at say 11am which is after the feeding and walking in the morning, and before the adoption floor is open. We've setup an hour long nap time for them, so I'd like some calm classical music type stuff to play during that time and for it to automatically start playing without anyone having to do anything. I'd also like it to be able to stop at the end of the day so the music isn't playing the entire night. Our behaviorists have talked about calming music possibly being a calming influence on the dogs behavior and I'm curious if it will be. I'm also curious if the music starts at the exact same time everyday (the same time the lights turn off/dim) if that will help trigger the dogs to take a nap. I'll give the XDG_RUNTIME_DIR a test and see what I can get to happen. Just for clarification, what is the "=/run/user/1000" part of that command? |
That is a very noble cause! Sounds like a good use case for running this via cron.
Here's an example where I'm searching for the
|
I'm trying to run patiobar/pianobar with crontab but I can't seem to get the audio to actually work. The only error message in a log I've gotten is something like "can't start audio device". Any suggestions for how to run this with Cron?
The text was updated successfully, but these errors were encountered: