[haiku] Re: Missing menu items in Deskbar

  • From: "Mark Hellegers" <mark@xxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 16 Jan 2016 19:59:13 +0100 CET

Mark Hellegers wrote on Thu, 14 Jan 2016 23:17:14 +0100 CET:
Is it possible to automatically run checkfs every day and e-mail 
the
results?  I used to have some kind of task scheduler on BeOS/Zeta 
that
could run a binary at a specified interval, but not sure something 
like
that exists for Haiku.

Does the launch daemon do that?  You could use one of the "cron" 
programs to
do that sort of thing (AGMSScriptOCron could do it).  Or you could 
write a
Bash script with a time delayed loop to do it, though I haven't tried 
it,
it would look something like this:

#!/bin/sh
i=0
while ((i < 10000))
do
  echo "`date` #$i"
  sync
  checkfs /boot | mail -s "Daily Disk Check" joe@xxxxxxxxxxx
  sleep 1d
  i=$(($i + 1))
done


Missed this the first round, but the mail command you use in your 
example does not exist on my system.
Do you have something that can easily send an e-mail like that?
I have written something similar (getting data from a database, though) 
which I could rewrite to send mail like this.

Kind regards,

Mark


--
Spangalese for beginners

'Blu shef farn wahr'
'May I please have my leg back'



Other related posts: