Support #729

audtool not working using cron

Added by Sylvain LABOISNE 20 days ago. Updated 9 days ago.

Status:Closed Start date:July 02, 2017
Priority:Minor Due date:
Assignee:- % Done:


Target version:-
Affects version:3.8.2


Hello guys !

I'm trying to get information from audtool, but it doesn't work using cron schedule.

I'm on Archlinux 4.11.7-1-ARCH

Step to reproduce :

1/ Start Audacious, and play some audio files -should be already done :)

2/ Take the script in attachment and put it in /tmp. Make it executable (chmod +x)

3/ Execute it : you get something like :
PID Audacious : 3362
audstat : playing
paused : 1
playing : 0

4/ do an crontab -e and put a line :
*/1 * * * * /tmp/ > /dev/null

5/ Wait next cron execution, and check the content of /tmp/aud-status. I have :
PID Audacious : 3362
audstat :
paused : 1
playing : 1

-> This is not expected, I should get same as 3/
As I get some values, there's no errors in cron, and audtool is executed (getting paused and playing values, even if they're wrong).

Any ideas ?

P.S. : delete the line in your cron. Magnifier (346 Bytes) Sylvain LABOISNE, July 02, 2017 13:42


#1 Updated by John Lindgren 17 days ago

  • Tracker changed from Bug to Support

Are you running the cron job from the same D-Bus session as Audacious?

#2 Updated by Sylvain LABOISNE 14 days ago

Well, audacious and my crontab -e are on the same session. How can I check that d-bus session is the same ?

#3 Updated by John Lindgren 14 days ago

Sylvain LABOISNE wrote:

Well, audacious and my crontab -e are on the same session. How can I check that d-bus session is the same ?


#4 Updated by Sylvain LABOISNE 14 days ago

1000 is me according to /etc/passwd

#5 Updated by John Lindgren 12 days ago

That's set in your cron script as well?

#6 Updated by Sylvain LABOISNE 12 days ago

Do I need to put something else to set dbus session ?
I tried :
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus;/to/my/script > /dev/null
No better results.

#7 Updated by John Lindgren 11 days ago

I'm not sure if it will solve the issue, but I think you need to remove the semicolon in the middle of that command.

#8 Updated by Sylvain LABOISNE 10 days ago

My mistake.

Indeed, it works now, the problem comes from the cron job that don't know my dbus session, putting that in crontab -e fixed it :

*/1 * * * * DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus /path/to/my/script

To know what to put after the "=", do a :


Thanks for help and for this great media player ! You can close this support issue.

#9 Updated by John Lindgren 9 days ago

  • Status changed from New to Closed

Also available in: Atom PDF