Python - send KDE knotify message with cron job on linux?

view story

http://stackoverflow.com – I'm trying to send a notification to KDE's knotify from a cron job. The code below works fine but when I run it as a cron job the notification doesnt appear. #!/usr/bin/python2 import dbus import gobject album = "album" artist = "artist" title = "title" knotify = dbus.SessionBus().get_object("org.kde.knotify", "/Notify") knotify.event("warning", "kde", [], title, u"by %s from %s" % (artist, album), [], [], 0, 0, dbus_interface="org.kde.KNotify") Anyone know how I can run this as a cron job? (HowTos)