a shell script file like and following code and then add shell script in cron.
Cron Entry
* * * * * /var/www/html/runcron.sh
Shell Script
#!/bin/bash
touch /var/www/html/tfile
dbus_session_file=/home/suntec/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0
if [ -e "$dbus_session_file" ]; then
. "$dbus_session_file"
export DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
dbus-send …
fi
zenity --error --text='Fill Time sheet' --display=:0.0
You need to save it in the Packages folder hierarchy for ST to pick it up - you can try Tools -> Developer - New Syntax, paste in the tmLanguage and save it in the folder ST recommends (Packages/User) as <packagefile>.tmLanguage , then Tools -> Developer -> New Syntax From <packagefile> .tmLanguage.
Comments
Post a Comment