Cron Job :: Run Script Every Second, Of Every Minute, Of Every Day

Jun 13, 2009

Say I have a script... /home/user/public_html/script.php

I want to run this script every second, of every minute, of every day.

How would I do this? I want to set up a cron and run it, I have written a cron and I am running it in shell as I type, but if I close shell the cron exits, can anybody assist me with making a cron run this script every second permanently.

View 4 Replies


ADVERTISEMENT

CSF ( High 5 Minute Load Average )

Nov 6, 2009

i`m using csf + lfd on the server ( CentOS / Cpanel )

i have received the notification from my root user regarding the "High 5 minute load average "

i have just checked my apache but couldn`t find any problem , everything is normal , But what`s the notification for ?

Note : The email included 3 files ( Apache status files )

Time: Sat Nov 7 00:34:48 2009 +0330
1 Min Load Avg: 8.28
5 Min Load Avg: 8.26
15 Min Load Avg: 8.26
Running/Total Processes: 11/171

View 8 Replies View Related

Per Minute In Exim Mail Queue

Dec 18, 2007

I get dozens of these per minute in exim mail queue

Quote:

1J4neJ-0001DS-Ns-H
mailnull 47 12
<>
1198027383 0
-ident mailnull
-received_protocol local
-body_linecount 33
-max_received_linelength 115
-allow_unqualified_recipient
-allow_unqualified_sender
-localerror
XX
1
root@server.mydomain.com

154P Received: from mailnull by server.mydomain.com with local (Exim 4.68)
id 1J4neJ-0001DS-Ns
for root@server.mydomain.com; Tue, 18 Dec 2007 19:23:03 -0600
038 X-Failed-Recipients: admin@domain.com
029 Auto-Submitted: auto-replied
063F From: Mail Delivery System <Mailer-Daemon@server.mydomain.com>
029T To: root@server.mydomain.com
059 Subject: Mail delivery failed: returning message to sender
052I Message-Id: <E1J4neJ-0001DS-Ns@server.mydomain.com>
038 Date: Tue, 18 Dec 2007 19:23:03 -0600

1J4neJ-0001DS-Ns-D
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

admin@domain.com
SMTP error from remote mail server after RCPT TO:<admin@domain.com>:
host sentry.domainbank.com [64.85.73.28]: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

------ This is a copy of the message, including all the headers. ------

Return-path: <root@server.mydomain.com>
Received: from root by server.mydomain.com with local (Exim 4.68)
(envelope-from <root@server.mydomain.com>)
id 1J4neI-0001D9-4I
for admin@domain.com; Tue, 18 Dec 2007 19:23:02 -0600
To: admin@domain.com
Subject: Services(2) failed
From: monitor@domain.com
Message-Id: <E1J4neI-0001D9-4I@server.mydomain.com>
Date: Tue, 18 Dec 2007 19:23:02 -0600

Address:mydomain.com

Following services are down:

SSH(22)
MySQL(3306)

Do not reply to this!
For further details please contact your provider!

Then I get this also

Quote:

1J4nhC-0001Kn-2T-H
root 0 0
<root@server.mydomain.com>
1198027562 0
-ident root
-received_protocol local
-body_linecount 13
-max_received_linelength 77
-auth_id root
-auth_sender root@server.mydomain.com
-allow_unqualified_recipient
-allow_unqualified_sender
-local
XX
1
root@server.mydomain.com

194P Received: from root by server.mydomain.com with local (Exim 4.68)
(envelope-from <root@server.mydomain.com>)
id 1J4nhC-0001Kn-2T
for root@server.mydomain.com; Tue, 18 Dec 2007 19:26:02 -0600
025* From: root (Cron Daemon)
045F From: root@server.mydomain.com (Cron Daemon)
009* To: root
029T To: root@server.mydomain.com
077 Subject: Cron <root@server> lynx --dump [url]
028 X-Cron-Env: <SHELL=/bin/sh>
025 X-Cron-Env: <HOME=/root>
033 X-Cron-Env: <PATH=/usr/bin:/bin>
027 X-Cron-Env: <LOGNAME=root>
024 X-Cron-Env: <USER=root>
052I Message-Id: <E1J4nhC-0001Kn-2T@server.mydomain.com>
038 Date: Tue, 18 Dec 2007 19:26:02 -0600

1J4nhC-0001Kn-2T-D
Not Found

The requested URL /agent/cron.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
_________________________________________________________________

Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7a mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.25 PHP/5.2.5 Server at
mydomain.com Port 80

View 4 Replies View Related

100ds Of Incoming Spam Per Minute

Sep 12, 2007

We are recieving 100ds spam emails per minute, which is causing for server load, as well email delay. Please help us how could we fix it

Its Plesk server

RH EL 3

View 6 Replies View Related

Lfd: High 5 Minute Load Average Alert - 6.37

Mar 21, 2008

I use CSF on a VPS with 512 RAM and 1024 Busrt and the other day I received the below notification. My hostsaid it was Mailman and since I don't use mailing lists the recommendationwas to disable it. So I did. I'm curious tho as to why this happened in the first place.

Time: Wed Mar 19 17:53:33 2008
1 Min Load Avg: 11.41
5 Min Load Avg: 6.37
15 Min Load Avg: 2.70
Running/Total Processes: 12/94 ...............

View 0 Replies View Related

Plesk 12.x / Linux :: Executing Cronjob Every Minute

Apr 18, 2015

A customer want to execute a cronjob in plesk every minute, but the cronjob was only executed every 5 minutes...

(so that the cronjob was executed every minute...)

View 2 Replies View Related

Plesk 12.x / Linux :: Admin Account Get Logged Out After A Minute

Feb 26, 2015

I'm running Plesk 12.0.18 Update #36 on CentOS 6.6 and when I log in, after just a minute of inactivity or so I get logged out.

The period of inactivity is set to 60 minutes, so that shouldn't be the problem.

View 7 Replies View Related

Plesk 12.x / Linux :: Increase Rate Of Send Mail Per Minute

Oct 16, 2014

How i can increase rate of send/minute for my campaigns of mail?

View 5 Replies View Related

SSH Cron Job

Feb 28, 2007

I wanna run this command "./adfsas.sh" Every 4 Hours can someone tell me what command I can use via SSH to set this cronjob?

View 8 Replies View Related

Cron Job

Oct 4, 2008

PHP Code:

* */1 * * *

But I didnt understand the difference from

PHP Code:

* * * * *

time property? Why is there a need for /1?

View 7 Replies View Related

Cron

Sep 17, 2007

I have root access to a server. Is it possible to create a cron that would restart my ftp and http server every so often. Like once a week or somthing. If so how would i do it?

View 6 Replies View Related

Cron Job

Feb 24, 2007

in order to backup db automatically i want to use cron job. So i set cron job at 00 AM

suppose that : my infos
db name : db
db user : zode
db pass : 123

the command i use is following

PHP Code:

mysqldump -u zode -p123 of -K -c -f --compatible=mysql40 --default-character-set=utf8 db > backup/db_`date +%d%m%y`.sql 

in good time i am looking into backup directory db is in it or not

but there is nothing in it

View 3 Replies View Related

Cron Job

Jun 18, 2007

I run A Centos 4.xx latest kernel server and Ive got a problem with Cron Job reporting.

The Cron Jobs themselves are working fine but I keep getting this message, on the hour, every hour

Quote:

Originally Posted by Email from the Cron Daemon

Not a directory: /etc/cron.hourly

The folder etc/cron.hourly DOES EXIST! and I cannot work out what could be causing this?

Does anyone hgave any ideas what could be causing it

View 2 Replies View Related

CRON Job Timing Out

Sep 19, 2007

i have had a problem for some time now, regarding my CRON jobs. I am trying to download a large amount of data from ebay (through their API, totally legal and aboveboard) using php, but my CRONjob times out.

I have tried resetting the timeout variable, but then it exceeds the maximum filesize
SO, my question: is there any way to have a script run as a CRON job, and wen it is complete, call another script?

View 4 Replies View Related

Per Second Cron Jobs?

Apr 5, 2009

Hey everyone, my friend's dad is looking for a web host that will allow his cron jobs to run every second. Most hosts apparently dont allow cron jobs faster than 5 seconds apart.

How often a host can run cron jobs isn't really advertised on their sites so I'm having a bit of trouble finding a host. I've resorted to just sending emails to sales addresses asking about it.

Does anyone know how I can find a host like this?

View 7 Replies View Related

Reboot Cron Job

Aug 20, 2007

VPS isn't rebooting by itself when it goes down. Anyone has any program/script that monitors heartbeat of the server? Like when it goes down, the program will automatically reboots the system. I know there's such a script out there but I forgot what it called.

View 2 Replies View Related

Cron Job Every Month

Jul 12, 2007

I want to execute the following command on the 15th of every month at 1AM:

echo > /usr/local/apache/logs/error_log

How to accomplish this?

View 2 Replies View Related

Cron: How To Run Php File

Feb 7, 2007

My server with cPanel, I'd like run file http://domain.com/file.php at 0h00 everyday, I have set the Cron Job in cPanel :

Code:
0 0 * * * /usr/bin/ehpwget http://domain.com/file.php
but The cron is not working well

Code:
/bin/sh: /usr/bin/ehpwget: No such file or directory

Can any one please let me know how to run a php file with cron.
(as user or root)

View 2 Replies View Related

Cron: First Of The Month

Jun 13, 2005

Anyone know how I'd run a cron job on the begining (first day)of every month?

View 2 Replies View Related

Does Cron Timeout?

May 23, 2007

Simply wondering, does cron timeout?

I have heard mixed reports and can't find any good info. Personally i've run a cronjob for up to 6 minutes, but as my best method was sending myself emails through php, its not exactly a highly accurate testing method.

On the same note, what would happen if one cronjob is running a php script for over 10 minutes, then another cron job starts on the same script, before the first one has finished?

View 2 Replies View Related

Cron Run Php Scripts

Sep 27, 2006

I have my own server. I create php file for adding cronjobs. I checked /etc/cron.deny and /etc/cron.allow. both of them is empty so no problem. I execute the php script but nothing : I check with crontab -u user l and it told me no cronjobs for that user. When I access as root from ssh and try teh same command, it works fine. I don't understand how to fix that.

View 0 Replies View Related

Rsync And Cron

May 5, 2009

I have a bit of a strange problem, I have an rsync command setup in the servers crontab and from the cron log it show it ran the command but the files don't copy to the backup server. If I take the rsync syntax and run it manually all the files copy across with no errors, but I can't figure out why the cronjob doesn't work properly.

View 8 Replies View Related

Remote Cron

Mar 30, 2009

I've just noticed that many people may have a free remote cron facility without realising it.

If you have any domains registered with Godaddy, you get free web space that includes a cron facility. It only runs every half hour, but you could set six jobs at 5 min intervals to get an effective 5-minute poll, which is good enough for many purposes. You could use it to check uptime on another site, for example. Has anyone tried this?

View 11 Replies View Related

Cron Job Deleted - Is Their A Log?

Jul 4, 2009

We are running cpanel on one of our servers. Several cron jobs were deleted from the cron panel of one acct. I have no idea of the paths to re-enter these jobs. Is their a log file on the server that will show cron job history from previous runs so I can recover the proper paths?

View 4 Replies View Related

Can Cron (back Ups)

Jul 10, 2009

I want to set up a cron job to make daily back-ups of my database, but by turning my site off first.

This is how I envisage it to work:
1: rename '.htacess' (in public_html folder for the site) to .htaccess-open
2: rename '.htaccess-closed' to .htaccess
// this closes the site down so no-one can write/access the db (they are basically shown a 'site down for maintenance' page - I already have the code for this)

3: mysqldump --opt (DB_NAME) -u (DB_USERNAME) -p(DB_PASSWORD) > /path/to/dbbackup-$(date +%m%d%Y).sql
// this backs up the database

4: wait for 3 to finish
5: rename '.htaccess' to .htaccess-closed
6: rename '.htacess-open' to .htaccess
// this opens the site back upIs this easy enough to do? Anyone got any tips/pointers?

View 4 Replies View Related

Cron Job Email In DA

Aug 5, 2009

I've got limited knowledge in scripting so I've come to the interweb for help. Google hasn't answered any of my queries so the trusty WHT is next.

I'm trying to create a script cron that will email my clients once per month with space and bandwidth useage reminders. I'd prefer not to have to set up crons in each individual account, but rather email all with tokening including |name| |bandwidth| |space| out of the allowed space & bandwidth according to the clients package.

View 2 Replies View Related

Cron Commands

Jan 28, 2008

I've been reading through tutorials for setting up cron commands via cPanel, but everything I have tried does not work. What I need to do is simple - I just want to run a php file on my server once every 15 minutes.

View 1 Replies View Related

Netstat & APF Cron Job

Oct 28, 2008

Netstat & APF cron job ...

View 7 Replies View Related

Error In Cron

Feb 25, 2007

Got this from the daily.cron email:

/etc/cron.daily/chkrootkit.sh:

/proc/18927/fd: No such file or directory

really weird, when I run that command manually, it doesn't show that error.

View 4 Replies View Related

Cron Job Less Than One Minitue

Oct 17, 2007

php script to run more than once per minitue.

View 1 Replies View Related







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