diff --git a/cron.bash b/cron.bash index f38c671..8754517 100755 --- a/cron.bash +++ b/cron.bash @@ -14,10 +14,12 @@ create_cron_job() { cron_line="${minute} ${hour} ${day_of_month} ${month} ${day_of_week} ${command}" # Add the cron job for the specified user. Redirects stderr to stdout. - (crontab -u yankee -l 2>/dev/null; echo "$cron_line") | crontab -u "$user" - + (crontab -u yankee -l 2>/dev/null; echo "$cron_line") | crontab -u yankee - echo "Cron job added for user $user:" + echo "$cron_line" + } whoami @@ -30,7 +32,7 @@ day_of_month="*" # Every day of the month month="*" # Every month day_of_week="*" # Every day of the week -command="/yankee-gnome-fire-consumer/consumer.bash" +command="/bin/bash /yankee-gnome-fire-consumer/consumer.bash" create_cron_job "$user" "$minute" "$hour" "$day_of_month" "$month" "$day_of_week" "$command"