Q:

Running a basic command using cron!

I'm running Ubuntu16.
I'm trying to run very simple bash scripts and cron jobs!
I'm trying to get cron to run the following bash script on a daily basis:  
#!/bin/bash
echo "Hello James how is your day going" 

I can run the script from the command line no problem, but cron won't? My Cron job is set up as such: 
0 15 * * * /tmp/myjob.sh

What am I missing?

A:

What you actually need first of all is this script here:
#!/bin/sh
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";

#Code:
DISPLAY=:0 
notify-send "Hello James how is your day going"

You can test by running it every minute.
*/1 * * * * /tmp/myjob.sh

This will give you a popup every minute with how you are doing ;)

