Fedora :: Cron Shutdown But Not On Weekend

Jul 5, 2011

Just read through some cron manuals. (man -k cron).Didnt understood that much though.I'm a gamer and loosing control over time at nights.
So what i want is that my computer shuts down itself at latest 1:30 am. Do i need to set up the command for each day (monday, tuesday.. and so on) or is there an option simliar to my 'example' below?

€dit: Both examples should do the trick.

Code:

# m h dom mon dow command
30 1 * * 1,2,3,4,5 shutdown -h +5 Get some sleep dude!
30 1 * * 1-5 shutdown -h +5 Get some sleep dude!

Where as 1 to 5 would be all weekdays, but not saturday or sunday morning at 1:30am.If i can shorten it to 1 line instead of 7 lines (one per day of week) that would be great.

View 14 Replies


ADVERTISEMENT

Red Hat / Fedora :: CRON To Shutdown The PC Every 10 Min?

Feb 11, 2010

I'm playing with CRON to perform an automated shutdown. While I'm testing I want CRON to shutdown the PC every 10 min. Here is the crontab.

# crontab -l
0,10,20,30,40,50 * * * * root /sbin/shutdown -h now

I see the command being run in the CRON log, but the PC doesn't shutdown.

Feb 11 11:06:17 localhost crontab[4808]: (root) LIST (root)
Feb 11 11:07:31 localhost crontab[4813]: (root) BEGIN EDIT (root)
Feb 11 11:07:58 localhost crontab[4813]: (root) END EDIT (root)
Feb 11 11:10:01 localhost CROND[4821]: (root) CMD (root /sbin/shutdown -h now)

How would I debug this to figure why my shutdown command is being ignored?

View 4 Replies View Related

Fedora Servers :: Gateway Autoshutdown During Weekend

Jan 5, 2009

I have one linux server act as gateway which is run on fedora platform. The problem occured recently when it keeps on shutting down itself during the weekend.. I have no idea what caused this autoshutdown. For your info, the server is NOT scheduled to auto-shutdown mode.

View 2 Replies View Related

Fedora Networking :: How To Stop Internet On Weekend

Feb 5, 2011

I am using squid in my Linux box. I want to allow my office staff that they may use internet from Monday to Friday.The IP range that they are using is 192.168.1.20. to 192.168.1.50n /etc/squid/squid.conf file under acl tagPHP Code:

acl weekend time A S 00:00-23:59
acl myoffice src 192.168.1.20 192.168.1.50/24
http_access deny myoffice 

[code]....

View 1 Replies View Related

Debian :: Unable To Shutdown The Cron

Mar 9, 2011

Is it possible to shutdown or to halt by means of cron ? this crontab entry is doing nothing: 45 3 * * * halt

View 2 Replies View Related

Ubuntu :: Run From Cron Shutdown Command Restarts Server Instead Of Shutting It Down?

Jan 4, 2010

I want my server to automatically shutdown at 23:59 and startup at 8:00. The startup is handled through by bios but the shutdown is to be managed through cron. I thought I had this working, I actually swear I had it working because I thought the uptime command showed the appropriate uptime. I happened to be up and was streaming a movie from my server when at the time it should've shutdown it actually just restarted. If I run the shutdown -h now command by itself it works well but the scheduled command just restarts the server. Here is the what is shown when I enter crontab -e.

View 9 Replies View Related

Fedora :: No Output From Cron Jobs In /etc/cron.daily

Jan 29, 2011

I have added some executable scripts to /etc/cron.daily but don't get the stdout/stderr output from them as mail (or anywhere else I have found). At least one of them is running (because I can see that it has added a file to the disk).

The peculiar thing is that I do get the output from /etc/cron.daily/0logwatch (part of the logwatch package) as an email each day.

The MAILTO line in /etc/crontab is "MAILTO=root" (unchanged from default). Same for /etc/anacrontab.

I do have an alias at the end of /etc/aliases which redirects root's mail to my own account, but this alias works fine for mail I send manually. (It also appears to work fine for the output from the file /etc/cron.daily/0logwatch.)

View 3 Replies View Related

Fedora :: Shutdown Policy Triggered By Vncserver - Computer Refuses To Shutdown Normally

Feb 5, 2011

Recently 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]....

View 2 Replies View Related

Networking :: How To Stop Internet On Weekend

Feb 5, 2011

I am using squid in my Linux box. I want to allow my office staff that they may use internet from Monday to Friday.The IP range that they are using is 192.168.1.20. to 192.168.1.50 In /etc/squid/squid.conf file under acl tag

Code:

acl weekend time A S 00:00-23:59
acl myoffice src 192.168.1.20 192.168.1.50/24
http_access deny myoffice

is it correct or I have to add some things more to stop internet access only on Saturday and Sunday.

View 1 Replies View Related

Programming :: Getting Weekend Out Duplicates From A List Of Servers?

Dec 26, 2010

I have a list of about 425 servers that are mostly redundant. I need to weed out the duplicate names so that I have a count of only the unique server hostnames. What is a good command to do this?

View 3 Replies View Related

Ubuntu :: Message And Kern.log File Exploded Over Weekend

May 10, 2010

I walked into work this morning and had a message from the system that my root drive had very little space. I traced it down to my message.1 file and kern.log.1 file. Together, they were over 2 GB.I am able to browse the file shares.

View 1 Replies View Related

Ubuntu :: Xserver Crashed After A Weekend Without Touching Computer

Dec 13, 2010

I have installed on friday a new distro on my computer, ubuntu 10.04 lts on my 1GB ram and 3Ghz computer. It has dual booting system. Everything worked fine, i have even been using the xwindows and althought i must say that it felt a bit slow in time reaction to my typing still good enough. I left the computer running with no programs, just idle and now my computers screen is dead. I can not see anything.

I restarted the computer and in normal mode it goes black.I started in recovery mode and i manage to get to a console where I type startx and i see the next error.So I had a fresh install, i worked with the xserver (so i do not think is a driver problem) fine until i left the computer without running anything and the xserver crashed.

View 4 Replies View Related

CentOS 5 Server :: Cron Job Doesn't Run, But Doesn't Error. "shutdown -r Now"

Aug 28, 2009

Is there something that blocks cron from running a shutdown command? I'm doing a daily bounce to break an attack (I have thread about that in security forum), but I always end up doing it manually. The cron log shows it being fired off at the right time...but the server never bounces. I thought maybe I just missed it, but there is nothing in messages that shows the server restarting (unlike when i do it manually, you see the start-up logging).

View 2 Replies View Related

Ubuntu Servers :: Cron Sending Email From Address / Change The Default Domain Name For Cron?

Apr 29, 2011

Can anyone tell me how i change the default domain name for cron?everything i cron runs it emails from and to user@com.com

this leaves me with a massive list of failed mails in postfix.i have mailto on my main crontab but i cant do it on all of them.

View 1 Replies View Related

Ubuntu Installation :: Cron's /etc/cron.daily/apt Not Upgrading?

Feb 25, 2010

It seems that cron is not upgrading my Ubuntu 8.04 LTS Server, no GUI installed. I changed /etc/crontab and watched apt running:

Code:

ps -A | grep apt

showed it for a long time,

Code:

sudo tcpdump tcp

showed communication with canonical sites,

but:

Code:

top

did not show any apt using CPU

[code].....

View 2 Replies View Related

Ubuntu :: Do Cron Updates Erase Cron Entries

Sep 19, 2010

I put in my cron entries to run my backup script which rsyncs my data to my 2nd drive, however on a hunch I checked my backup drive which mounts automatically via fstab and I realize it had not ran in a while. I checked cron and there were no entries for it. I got to wondering if I should ever be worried about a cron update coming down and over-writing my existing cron file with the backup entries in it to run.

View 2 Replies View Related

CentOS 5 :: Setup A Cron In /var/spool/cron/root

Feb 16, 2010

I have set up a cron in /var/spool/cron/root

*/15 * * * * /usr/bin/phplist.sh

I can see in /var/log/cron that it is running every 15 minutes but it has no effect. It is not doing the commands in the bash script.

If I run /usr/bin/phplist.sh right in the shell it works great.

View 3 Replies View Related

Software :: Vixie-Cron Not Running /etc/cron.d/

Feb 9, 2011

Is my vixie-cron broken? i have "0-59 * * * * root /usr/sbin/logrotate /etc/logrotate.conf" but it is not running in /etc/cron.d.

Code:

View 2 Replies View Related

Server :: Shutdown The Nodes From The Master Terminal Using "shutdown -h Now" Get Shutdown?

Dec 10, 2010

I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .

Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?

View 1 Replies View Related

Fedora :: Configuring Cron Job

Apr 21, 2010

I create a shell file with different commands . I am able to execute it manually . Now I want to schedule this file hourly . For this where I place this file and where I configure for time .

View 6 Replies View Related

Fedora :: Can't Get A Cron Job To Work On 11 Box

Oct 6, 2010

I can't seem to get a cron job to work on my Fedora 11 box. When I check the logs, cron is actually working. In my /etc/crontab I have an entry to run the cron job on my Moodle installation:

30 * * * * wget -q -O /dev/null http://moodle.name.name/moodle/admin/cron.php

when I run crontab -l it is not showing me anything, I am confused

View 1 Replies View Related

Red Hat / Fedora :: How To Schedule A Cron Job

Feb 28, 2010

I would like to schedule a cron job to run on every first saturday of the month, so far all documentation that I have looked at, mentions only a weekly cron or a monthly cron based on the date. Is it possible to run a monthly cron based on the day of the week?

View 1 Replies View Related

Red Hat / Fedora :: How To Schedule Job Using Cron

Aug 12, 2010

How to schedule a job using cron that shouldn't run between working hrs 9am-5pm, while run in non working hrs every hour, every day of the month, month & week. I tried the following way, not sure I can use logical not operator(!).

crontab -e
0 !9-17 * * * /path/to/script/file
I guess other way is
0 17-8 * * * /path/to/script/file

View 1 Replies View Related

Red Hat / Fedora :: Can't See Php Script In Ps And Cron Job

Dec 15, 2010

i have couple of question first when i m running my php script file named myindex.php and while its running in browser i add this code in putty to see if it shows my php script is running or not but i see nothing ps aux |grep myindex.php | grep -v grep

why i cant se if myindex.php is running or not with above command.

second how can i add a cron job to my php script, i know only through kloxo or cpanel.

View 2 Replies View Related

Ubuntu :: Monitor Out Of Sync During Boot And Shutdown (also Shutdown Hang)?

Jun 30, 2010

when my pc boots and shuts down my monitor goes into 'input out of range' mode for a bit between the gui and the text only phases of boot/shutdown.is there a way to fix this? or where to start troubleshooting?also, when it shuts down it hangs after coming back to the text only part

View 4 Replies View Related

Fedora :: Setup Cron Job To Update ?

Oct 30, 2009

Just installed Fedora 11. Like to setup cron job to update everthing on a regular basis. any examples?.

View 4 Replies View Related

Fedora :: Run A Cron Job Every Half Hour ?

Nov 15, 2010

I wish to run a cron job every half hour, where exactly do I put the job? The reason I am asking is that I am used to entering jobs into crontab, I am not used to using fedora and its cron layout.

View 2 Replies View Related

Red Hat / Fedora :: Where To Exactly Enter Cron Jobs

Nov 15, 2010

I have a Fedora 11 box and I am confused about cron, where exactly do I enter the cron jobs? For example, I have a job that needs to run every half hour.

View 8 Replies View Related

Red Hat / Fedora :: Get Files From Windows Using Cron Job ?

Nov 27, 2010

In my windows machine I have some txt files. I want run a script or command daily to get those file to my linux box using cron job.

Windows (192.168.1.5)

d:
ecords est.txt

to

Linux (192.168.1.

/data

I want to run that script in my linux box every day at 10.30 AM using cron job to get those files from windows to linux.

View 1 Replies View Related

Fedora :: Backupmng Every Hour In Cron?

May 28, 2010

I found (Red Hat Fedora Core 6 Server) a CRON entry for "backupmng" that has repeats at 1,16,31 and 46 minutes every hour of every day, 24/7.It is located at:/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved