I would like to get some kind of notification when a script has been executed.

I know how to get an email sent, but I something different.

This works, unless it occurs when I am not at my computer.

notify-send "Cleanup of Backup Directories complete."

I would prefer creating a file in a directory.

  • 1
    How do you execute the script ? Aug 25, 2018 at 23:21
  • If you're using desktop terminal, then your question is duplicate of askubuntu.com/q/409611/295286 Aug 25, 2018 at 23:23
  • Usually I execute it from crontab, but sometimes I double click it. I edited my question. So it is not a ducplicate. @ Sergiy Kolodyazhnyy
    – fixit7
    Aug 26, 2018 at 0:06
  • 4
    what do you mean get notification when script is executed? if you are running in crontab so it has specific scheduled time which always you know when it's executing, if you are running by double-click still you know whrn you are running that. So what you want to be notified to you? if you need to create a file when executing, edit your script and add a line like echo 'script is executing' > /log/to/file, you can do the same when it's finishing at the end Aug 26, 2018 at 2:49
  • Related: askubuntu.com/search?q=redirect+output+to+a+file
    – Elder Geek
    Aug 27, 2018 at 18:14


You must log in to answer this question.

Browse other questions tagged .