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

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

 



On 12Apr2009 20:23, Antonio Olivares <olivares14031@xxxxxxxxx> wrote:
| I want to know if it is possible to edit/append to crontab without
| using crontab -e.  I have about 10 machines running Fedora and at the end
| of the day I have to manually power them off (shutdown).  For a while,
| I started thinking about it, well I can make a crontab to shutdown the
| machines at a certain time:

Something like:

  #!/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"

maybe? Untested, but you get the idea I'm sure.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

I distrust a research person who is always obviously busy on a task.
- Robert Frosch, VP, GM Research

-- 
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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux