0

I was using an at command in my bash profile to echo the time of day at every hour to remind me of the time but now when I open up the command line it flashes a lot of annoying warning like these:

warning: commands will be executed using /bin/sh
job 241 at Thu Sep  1 00:00:00 2016
warning: commands will be executed using /bin/sh
job 242 at Thu Sep  1 01:00:00 2016
warning: commands will be executed using /bin/sh
job 243 at Thu Sep  1 02:00:00 2016
warning: commands will be executed using /bin/sh
job 244 at Thu Sep  1 03:00:00 2016
warning: commands will be executed using /bin/sh
job 245 at Thu Sep  1 04:00:00 2016
warning: commands will be executed using /bin/sh
job 246 at Thu Sep  1 05:00:00 2016
warning: commands will be executed using /bin/sh
job 247 at Thu Sep  1 06:00:00 2016
warning: commands will be executed using /bin/sh
job 248 at Thu Sep  1 07:00:00 2016
warning: commands will be executed using /bin/sh
job 249 at Thu Sep  1 08:00:00 2016
warning: commands will be executed using /bin/sh
job 250 at Thu Sep  1 09:00:00 2016
warning: commands will be executed using /bin/sh
job 251 at Wed Aug 31 10:00:00 2016
warning: commands will be executed using /bin/sh
job 252 at Wed Aug 31 11:00:00 2016
warning: commands will be executed using /bin/sh
job 253 at Wed Aug 31 12:00:00 2016
warning: commands will be executed using /bin/sh
job 254 at Wed Aug 31 13:00:00 2016
warning: commands will be executed using /bin/sh
job 255 at Wed Aug 31 14:00:00 2016
warning: commands will be executed using /bin/sh
job 256 at Wed Aug 31 15:00:00 2016
warning: commands will be executed using /bin/sh
job 257 at Wed Aug 31 16:00:00 2016
warning: commands will be executed using /bin/sh
job 258 at Wed Aug 31 17:00:00 2016
warning: commands will be executed using /bin/sh
job 259 at Wed Aug 31 18:00:00 2016
warning: commands will be executed using /bin/sh
job 260 at Wed Aug 31 19:00:00 2016
warning: commands will be executed using /bin/sh
job 261 at Wed Aug 31 20:00:00 2016
warning: commands will be executed using /bin/sh
job 262 at Wed Aug 31 21:00:00 2016
warning: commands will be executed using /bin/sh
job 263 at Wed Aug 31 22:00:00 2016
warning: commands will be executed using /bin/sh
job 264 at Wed Aug 31 23:00:00 2016

The command I am trying to run is example:

echo "midnight" | at 00:00

How can I remove these warnings?

Notes: It is not like the question; "Why does at warn me that commands will be executed using /bin/sh? What if I want a different shell?" because, I don't want know why I want to know how to get rid of warning and I don't want to know anything anything about the shell.

marked as duplicate by andcoz, Stephen Kitt, mdpc, Stephen Harris, Thomas Dickey Sep 1 '16 at 1:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    FYI: Sounds like you want cron—that's the normal way to run a command every hour. – derobert Aug 31 '16 at 16:25
  • Except for that the output I want is different every hour. Example: – Nathan Hill Sep 1 '16 at 1:47
  • midnight, 7 o'clock, ect. – Nathan Hill Sep 1 '16 at 1:48
  • I have had one answer and it worked so unless you have a better answer or explanation of why that worked then please stop commenting. – Nathan Hill Sep 1 '16 at 1:50
  • also please stop marking this as a duplicate because I have looked at the other question and it asking how to use a different shell to get rid of the warning message where as I just want to change the command so it doesn't show the warning and the answer I got that worked was not on the other question. – Nathan Hill Sep 1 '16 at 1:57
1

echo "midnight" | at 00:00 2>/dev/null

Not the answer you're looking for? Browse other questions tagged or ask your own question.