Re: how to add stuff to crontab without using crontab -e

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> [olivares@localhost Documents]$ ./edit-crontab 
> ./edit-crontab: line 7: unexpected EOF while looking for
> matching `"'
> 
>

I have fixed it.  Thank you very much again for your kind help :)

[olivares@localhost Documents]$ crontab -l
# min hr dom mon dow command
30 04 * * 1-5 ~/alarm  >& /dev/null
30 05 * * 1-5  killall -9 /usr/bin/mplayer >& /dev/null
#10 06 *  *  ~/alarm2 >& /dev/null

[olivares@localhost Documents]$ ./edit-crontab 
[olivares@localhost Documents]$ crontab -l
# min hr dom mon dow command
30 04 * * 1-5 ~/alarm  >& /dev/null
30 05 * * 1-5  killall -9 /usr/bin/mplayer >& /dev/null
#10 06 *  *  ~/alarm2 >& /dev/null

15 16 * * 1-5 /usr/bin/poweroff >/dev/null 2>&1
[olivares@localhost Documents]$ cat edit-crontab
#!/bin/sh
set -ue
tmp=/tmp/crontab$$
crontab -l >"$tmp"
echo "15 16 * * 1-5 /usr/bin/poweroff >/dev/null 2>&1" >>"$tmp"
crontab "$tmp"
rm "$tmp"


Regards,

Antonio 


      

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux