0

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.

fixit7
  • 3,127
  • 1
    How do you execute the script ? – Sergiy Kolodyazhnyy Aug 25 '18 at 23:21
  • If you're using desktop terminal, then your question is duplicate of https://askubuntu.com/q/409611/295286 – Sergiy Kolodyazhnyy Aug 25 '18 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 '18 at 00: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 – αғsнιη Aug 26 '18 at 02:49
  • Related: https://askubuntu.com/search?q=redirect+output+to+a+file – Elder Geek Aug 27 '18 at 18:14
  • I am using this. touch /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/$( date '+%Y-%m-%d_%H:%M' ) – fixit7 Aug 27 '18 at 19:31

0 Answers0