bash - Zenity not working in python script with crontab -
i have python script in have used zenity display notification. code snippet follows:
if message_list: pretty_print(message_list) os.system("/usr/bin/zenity --notification --text='you have unread messages'") when run script normally, works fine i.e. dialog box appears , message gets displayed. when schedule script in crontab nothing appears. solution this?
there no sane way run interactive commands cron. there no guarantee there user, there no guarantee there single user, there no guarantee user(s) on want to, or able to, interact software; of them may pseudo-users or remote on expensive metered internet access or idle or whatever.
the usual solution server/client architecture whatever runs cron makes results available via ipc mechanism, , users want results run client within x11 session (or shell, or have you).
Comments
Post a Comment