Red Hat / Fedora :: Shutdown System Through Crontab?
Jun 11, 2009I am practicing on "crontab" and am able to get system status in time but I want to shut my system through crontab.#15 12 11 06 thu init 0
View 1 RepliesI am practicing on "crontab" and am able to get system status in time but I want to shut my system through crontab.#15 12 11 06 thu init 0
View 1 RepliesI'm running Ubuntu server 8.04.3 with eBox on a Dell GX280. I want to power off my box automatically every night, so as root I added a crontab entry "05 1 * * * /sbin/shutdown -P now". The command runs on schedule but most days the PC goes into a coma instead of powering off. It doesn't respond to key presses or mouse movement or Ctrl-Alt-Delete, I have to push its power button to complete the shutdown. I have tried a variety of alternatives such as "/sbin/shutdown -h" and "runlevel 0", they all behave the same way
View 14 Replies View Relatedhow to schedule shutdown every day using crontab
View 1 Replies View RelatedI am unable to use crontab as a user on my system.
Code:
The error is: You (user) are not allowed to access to (crontab) because of pam configuration. I did just recently do an update but I am not sure why this is acting up. I also tried it as root and it also failed with a similar message. I had several crons that ran daily and they are not currently working also. I have selinux Disabled and it has been that way for some time.
I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday
View 3 Replies View RelatedI currently run kernel 2.6.34.7-66.fc13.i686 (sort of). When I select from the Gnome menu System -> Shutdown and select Shutdown from the dialog, my system only logs out, presenting me with the greeting screen. While this is a minor problem and I rarely shutdown my machine, it is mildly disconcerting.I have dropped back to 2.6.34.7-63.fc13.i686 and that shutdowns properly using this method. (Also, 2.6.34.7-61.fc13.i686 works properly). I can imagine that it might close some security issue in which an unauthorized user is able to halt the entire machine. Especially if this is something that will continue in future releases of the kernel.
View 5 Replies View RelatedWhen I try to shutdown or reboot from the system menu in Fedora 12, I am returned to the logon prompt. I am able to shutdown and reboot from a terminal window by issuing the shutdown command as the root user.
View 6 Replies View RelatedDoes fedora 12 have logout sound and wallpaper? I don't get a logout music and the logout screen is blank.
View 2 Replies View RelatedI've just installed F15 KDE Edition, and as the title tells, I need to keep pressing F2 and/or Enter to make the system go through the boot up process, otherwise it freezes as long as i keep it without my interference !! and then it takes relatively long time to start the GUI, and when I switch to the console (using ALT + CTRL + F3 for example) and try to write the login or the password, there seem to be some 'bouncing' effect, that if I'm to write the login 'root', I get something like 'rrooott' ... however, this doesn't happen in the GUI .....
I have a multiboot system, with Windows7 and Linux Mint (based on ubuntu 10.4) installed along side. While Windows7 doesn't have any problem with my hardware, Linux mint has also some issues that cause the performance of media players to degrade (sound and video tearing) and cause repeated freezes to some applications (a game actually, 'wesnoth') until I press a key or move the mouse.
I have AMD Athlon 7750 dual core 2.7 GHz system, with 3GB DDR2 800 Ram, and embedded ATI Radeon HD 3200 with about 512 shared memory.
one more thing, when I booted off the live image to run the install program, I booted into the video failsafe mode (not sure of the exact name, but I think you got it, no mode setting) and passed the option 'noapic', so I suppose this options are still passed whenever I boot mysystem, as I get the text version of the progress bar during startup, rather then the graphical fedora logo ( i.e no mode setting) ..
I have just made a clean installation of FC12. The only change I have made for now is to disable the NetworkManager and set a static ip address. My problem is that when I click "shutdown" it doesn't complete the shutdown and hangs due to some kind of kernel error. Then I have to use the power-switch to shut it down. It doesn't happen every time, but it happens often (every 3rd shutdown or so).
I get this error-messages on the screen:
Code:
Unmounting file systems:[OK]
Halting system...
--------[ cut here ]-----------
kernel BUG at kernel/time/clockevents.c:262!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/mmodule/ip6_tables/refcnt
Modules linked in: {long list}
Pid: 1809, comm: hal Not tainted (2.6.31.12-174.2.22.fc12.i686 #1) OptiPlex GX270
This is exactly whats described here: [URL].
I have machine which I am using a server for all my office activities. We have fedora (11.0) installed in that system. When even power goes out system is getting shut-down abruptly. We have UPS for this system and some times UPS also runs out of power. Do we have any software, which monitors battery power and shutdown the system gracefully, when system knows that power is running out. I am using desktop machine, not a laptop. So I may some hardware like battery which runs fot sometime, even though there is no power. Then there will software which monitors and shut down the system gracfully.
View 3 Replies View RelatedI was trying to write a crontab entry using "crontab -e"
Code:
0 0 * * * cp /var/log/httpd/domains/mydomain.net.log
/home/admin/logs/mydomain.net.log
crontab is giving me this error:
Code:
"/tmp/crontab.XXXXfMOnRS":2: bad minute
errors in crontab file, can't install.
I've tried a dozen different values for the minute, but it's still giving me the same error.
Is there a way to view all the crontab files, owned by root, users, and other system accounts, that exist on a system simultaneously rather than having to go the individual accounts? The distribution in question here is the Debian 4.0 release.
View 2 Replies View Relatedis it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh
View 4 Replies View RelatedRecently I installed vncserver (tigervnc) on my desktop. Ever since my computer refuses to shutdown normally. At shutdown the following message pops up: Quote: System policy prevents stopping the system when other users are logged in Then I have to enter the root password to shutdown. If I stop vncserver before, the computer shuts down normally.
[Code]....
I have a question about using crontab with /etc/crontab...
I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).
Originally, my cron job looked like this:
30 * * * * root /my/batch/script &> /dev/null
After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.
So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).
How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)
I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh
View 1 Replies View RelatedI tried the above command on my pc. It broadcasts the message passed , but I noticed one thing that during this time( 2min) normal users are not allowed to login onto the terminal.
View 2 Replies View RelatedScript iptables_reset.sh
Code:
#!/bin/bash
IPTABLES="$(which iptables)"
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
[code]....
This works if I edit the system-wide crontab in /etc/crontab like this:
Code:
0 12 * * * root /root/iptables/iptables_reset.sh
But it won't work, if i edit roots user-cronfile by using crontab(1):
Code:
crontab -l
# m h dom mon dow command
0 12 * * * /root/iptables/iptables_reset.sh
The log entry is the same for system-wide and user-cronfile:
Code:
/USR/SBIN/CRON[5135]: (root) CMD (/root/iptables/iptables_reset.sh)
I tried different things and found out,if i don't use the "$(which iptables)"substitution in the script, it also works with the user-cronfile.
I am setting my cron to work. I am in the roo account/ So first I type as vi crontab -e. Then it ask me type "visual" for normal mode and do that then I type the following as below 1 * * * * root usr/local/testClient/runClient.sh>/usr/local/testClient/cron1.log and press esc type wq. Then I restart the cron service /etc/init.d/crond stop and /etc/init.d/crond start. Lastly when I type crontab -l it tells me no crontab for root.
View 2 Replies View RelatedFrom couple of mins my system shutdowned without my permission I thought I'm infected or something because I installed aMSN so I thought it's because of it, but I checked my syslog and found this:
May 5 00:01:30 spuny-laptop kernel: [ 2441.497050] CE: hpet increasing min_delta_ns to 15000 nsec
May 5 00:17:01 spuny-laptop CRON[1912]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
May 5 00:37:32 spuny-laptop pppd[1560]: Protocol-Reject for unsupported protocol 0xac05
May 5 00:38:15 spuny-laptop pulseaudio[1426]: ratelimit.c: 2 events suppressed
May 5 00:48:06 spuny-laptop kernel: [ 5237.586974] hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
May 5 00:50:22 spuny-laptop kernel: [ 5373.683347] Critical temperature reached (100 C), shutting down.
May 5 00:50:22 spuny-laptop kernel: Kernel logging (proc) stopped.
Temperature reached is that what cause system halt? Also when I press ctrl+alt+Fn I see blank screen why is that?
I am using Ubuntu 10.04. From last 3-4 days, after updating, I am not able to shutdown the system. I try to use command, but behavior is same Whenever I try to shutdown the system, it exits from desktop environment and a white screen displays on screen. And nothing happened. One time I did wait for 1/2 hr, but system dont seems to power down.
View 4 Replies View Relatedmy system needs two times shutdown button selection for shutdown , after doing second its getting shutdown , for single selection its not
View 1 Replies View Relatedafter installing linux mint 7, I have been getting one beep on shutdown, a google search on this came back as a ram problem...but then i ran across a bunch of posts on ubuntu forums about one beep on shutdown, with an older version of ubuntu, grep does return some paramter errors, but in the mint bug report page those are listed as : benign ignore. it doen't bother me in the least, as long as it isn't a warning of impending hardware failure.
View 5 Replies View RelatedI'm running Ubuntu 10.04, and I like to logout or shutdown or restart my system with system->shutdown just as in Fedora, but it's not there. How can I add this, the only way that I have been using is through the terminal or Crtl-Alt-D, which doesn't has Logout option but Hibernate.
View 2 Replies View RelatedTested on RedHat entreprise 5.5, 5.4, 5.3 I would like to stop my db (not oracle) when the system shutdown or reboot. I have wrote my script for init.d
Here is the head :
The problem is : shutdown -r stop the system before my K script execute. I have not my "blabla" in /tmp/mystop.log
In fact the scritp is for database startup and database shutdown manually it works I mean : /etc/init.d/mystop stop ; /etc/init.d/mystop start So I truncated the scritp until I only get echo "blabla"
This work idealy under HPUX, AIX, and I think I'm missing something "special" for Redhat. I'm quite sure it was ok with redhat 8 and ES 3.0.
I have a problem using crontab. I have a C file which invokes a linux command. I want to execute the file using crontab. Its like whenever the system boots up and contents gets loads i want to execute this script. The problem is I don't know how to run the script using crontab. For eg if the file is present under /home/user/first.c . In order to execute this script whenever system starts wat wil be my command
View 7 Replies View RelatedI want to get mail from the crontab log file....
How to set log file in crontab and the second and how can i get mail from the crontablog file.
As the object, when I shutdown or restart my system, this will stuck on black screen for about 30/40 second and then continue...
My system is debian testing with kernel 4.1.0-2
I am running Debian Squeeze on an Intel DH55TC motherboard. When I issue a shutdown command
shutdown -h now
The system goes shutting down. Eveything looks fine, and the main console shows all process being stopped. In the end it says "System will now halt". Then a few seconds later, it restarts. It is unclear what is causing this, because nothing is written to the screen. It just goes blank and starts rebooting. Looking afterwards in syslog doesn't show anything also.