Cron Job :: Run Script Every Second, Of Every Minute, Of Every Day
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 Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Cron Job
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 Replies!
View Related
Cron Job
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 Replies!
View Related
CRON Job Timing Out
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 Replies!
View Related
Reboot Cron Job
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 Replies!
View Related
Cron Job Email In DA
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 Replies!
View Related
MySQLDUMP Cron Job
setting up a new cron job. I would like to have MySQLDUMP dump my specified database(s) into a specified folder using date and time stamps in the filename. I've done some searching on this but haven't really came up with a way to do all of this at once, or if I may need to setup a cron job to rename the file after the dump has completed. I may be going about this all wrong to begin with, I'm just looking for a very simple and reliable way to backup my databases. I'm testing this on a Shared Web Host account at this time which does have SSH shell access, but I wasn't sure if this makes a difference.
View Replies!
View Related
Cron Job Deleted - Is Their A Log?
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 Replies!
View Related
Cron Job And Query String
Is it possible to call a cron job with a query string appended to the file. I have no problem setting up crons in the cron tab..but i'd like the cron to fetch a url that looks something like /home/php/some-file.php?a=1 is this possible directly through the cron job? I guess an alternative is call some php file that uses curl but i was wondering if there 's a direct way.
View Replies!
View Related
Random Cron Job Command
I am running wordpress with wp O matic. I want to update my content after 24 hours (but different time each day). Bottom line is I want a cron command which randomly execute after 24 hours instead of a particular time. For example currently wp o matic shows the following command the following command, would you please advice how i change the this command to achieve the above results (right now wordpress is running on my computer so following thing is just for example) */20 * * * * F:Testlogwp-contentpluginswp-o-matic/cron.php?code=8b935355
View Replies!
View Related
Cron Job Not Working Properly
I have a slight problem with a cron job I have setup. I wanted to save a copy of iptables every hour to a folder, so I created a script... here it is: Code: varDate=`date +%y%m%d` varTime=`date +%H%M` filename="IPtablesBackup-$varDate-$varTime" iptables-save -c > /etc/IPtablesBackup/$filename and called is Backup-Script.sh Now if I just execute the script will in root ./Backup-Script.sh I get a new file with the correct filename and iptables info is saved ! Great ! So then I thought, how can I setup this automatically every hour. Which leads me on to my problem. I inputted "crontab -e" added this line Code: 59 * * * * /etc/IPtablesBackup/Backup-Script.sh The problem is the script is run, I know because it creates a new file with the correct time and date, however the file is empty? I have set Backup-Script.sh to 777 and owner and group are both root?
View Replies!
View Related
Cron Job With Multiple Databases
I have several DBs and need to run a cron job on one of the databases every night. to run a repair/optimize on the DB as its very active, this is the command I thought I would use: Code: REPAIR TABLE `etc` , `etc` , Code: OPTIMIZE TABLE `etc` , `etc` , How do I specify which database to run this on in the cron in CPanel?
View Replies!
View Related
Cron Job Failure Mails
I have a server like this: WHM 10.8.0 cPanel 10.9.0-S9966 CentOS 3.8 i686 - WHM X v3.1.0 My cron files are like this: var/spool/cron/ Quote: 33 4 * * * /scripts/upcp 0 1 * * * /scripts/cpbackup */15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1 2,58 * * * * /usr/local/bandmin/bandmin 24 5 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify 0 0 * * * /usr/local/bandmin/ipaddrmap 0 */1 * * * /usr/local/nobody_check/nobody_check >/dev/null 2>&1 0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1 */5 * * * * perl /root/rvadmin/rvmultiupdate.pl >/dev/null 2>&1 14 6 * * * perl /root/rvadmin/auto_rvskin.pl */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1 But e-mails like tha is coming to me Quote: Cron <root@mavi> /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1 /bin/sh: line 1: 1 : ambiguous redirect Quote: Cron <root@mavi> perl /root/rvadmin/rvmultiupdate.pl >/dev/null 2>&1 /bin/sh: line 1: 1 : ambiguous redirect
View Replies!
View Related
Cron Job Not Working, Restart Services
I'm having a bit of trouble with one cron job that doesn't seem to work. I have others scripts that run hourly fine. However this one does not. The script: restart_monitoring.sh Code: #!/bin/bash service iptables stop service iptables start /root/bandwidth_rules.sh /root/portforward_config.sh exit The two scripts at the end just load a lot of iptables rules back in. The cron job should run hourly (59th minute) The cron job entry Code: 59 * * * * /root/restart_monitoring.sh I have restart crond to enable the new job, still doesn't run. The job is to restart iptables, thus flushing all rules that I have running, then reloading them. I have figured out the problem to be with the "service iptables stop/start" command, it doesn't seem to like doing this...?
View Replies!
View Related
Cron Job In Cpanel. Want To Automate Backups
I have been doing some research and I would love some help with this. I want to set up a cron to automatically backup my site's files & databases once a month. And I am not sure what how I do it? - Do I need a script on my server and then the cron job runs it? - Is there a better way to do this then cron?
View Replies!
View Related
Scheduled Consecutive Shell Commands Or As Cron Job
Is it possible to schedule consecutive shell commands to be run at a given time or every certain period (like every hour)? This is important for me as I want to schedule to run certain program and then input the following commands afterwards to do and complete the task, all automatically within the specified schedule. One example would be connecting to an FTP. First you'd need to input the ftp command to run the ftp program, then following that, input another commands consecutively within that session (the ftp program) to do and complete the task. I'm running KDE on CentOs4 btw. Is it even possible to do this on cron jobs?
View Replies!
View Related
Cron Job That Deletes Backup Files Older Than 5 Days
This is on a RHEL 4 Box. I want to create a cron job that deletes backup files that are older than 5 days. I have created a shell script (/usr/local/src/runjob.sh) that runs successfully from the SSH command line: Code: #pwd /usr/local/src #./runjob.sh Here is the script: Code: #!/bin/sh # # find /usr/local/apache/sites/*/BACKUPS/ -maxdepth 1 -atime +5 -iname 'test*.txt' -exec rm {} ; Script has 777 permissions and is owned by root. I have the following entry in crontab: Code: 10 12 * * * /bin/sh /usr/local/src/runjob.sh >/dev/null 2>&1 As shown in the cron log, the job does run, but it does not delete the files. And there are files older than 5 days in the directory that meet the find criteria.
View Replies!
View Related
Create A Cron Job To Clear Your /tmp Folder Automatically?
how I can create a cron job that runs every 10minutes or so to clear my /tmp folder on one of my servers? Reason I ask is, it keeps getting filled up and doesn't delete the fiels in it and stops certain scripts from running. Also, again, I need step by step instructions, such as: 1) what, where the file is I need to place the cron job in 2) what line of code would I put in that file (what does the cron job line look like for every 10min every day) 3) do I need to restart anything, and if so, what command do I run in shell?
View Replies!
View Related
HOWTO Cron Job To Copy Files From Folder To Root
how to setup a cron job to copy files & directories from one folder to the root folder. I have CPanel X. My root directory is public_html/ I have another directory public_html/uploads containing both files and directories. I need a cron job that will copy all the files & directories from public_html/uploads to the root public_html/ If it helps, here is some system info General server information: Operating system Linux Service Status Click to View Kernel version 2.6.22_hg_grsec_pax Apache version 1.3.39 (Unix) PERL version 5.8.8 Path to PERL /usr/bin/perl Path to sendmail /usr/sbin/sendmail PHP version 4.4.4 MySQL version 4.1.22-standard cPanel Build 11.17.0-STABLE 19434 Theme cPanel X v2.6.0
View Replies!
View Related
Cron: How To Run Php File
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 Replies!
View Related
Cron Run Php Scripts
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 Replies!
View Related
Cron Job - "No Input File Specified."
I'm on paid hosting and accessing the cron jobs through a control panel. I have a php script that I'd like to run daily. I've put this script in the folder http://mysite.com/Cron/ . When I navigate to this file directly in my web-browser it runs perfectly and sends me an e-mail. When I try to set up a cron tab to execute it, though I get the following error in the cron output... Quote: Status: 404 X-Powered-By: PHP/4.4.6 Content-type: text/html No input file specified. The command I entered into the control panel was... Quote: php [url] I also tried... Quote: php -q [url] ...and... Quote: php /Cron/SendMail.php ...those times getting the error... Quote: /bin/sh: [url]: No such file or directory why this might not be working for me?
View Replies!
View Related
Per Minute In Exim Mail Queue
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 Replies!
View Related
CSF ( High 5 Minute Load Average )
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 Replies!
View Related
Lfd: High 5 Minute Load Average Alert - 6.37
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 Replies!
View Related
ManageMyServices... Run.. "Forest" Run
Server been down over 14 hours..... over 50 sites down.... standard response within a few hours... we will reboot your server within the next 30 min. Sites come up for 3 minutes then down again.... Resubmit ticket... few hours later.... same response... reboot server.... same result... server still down. Last ticket submitted over 3 hours ago.... no response...server still down. No phone number... Hard to believe anyone would run a business in this manner, knowing peoples livelyhood depends on their sites being up.
View Replies!
View Related
Background Job Exited
I have a CentOS system (under VPS, virtuozzo) and I would like to run a background job. Here what I did: 1. ssh into the server 2. execute: $ ./myscript.php > output.log & After executing that command, I got back to the shell prompt. Then I can see the log file: $ tail -f output.log But when I close my ssh session (using putty), the background job is also closed! Anyone know why? How can I run background job, leave it running, and quit my ssh session?
View Replies!
View Related
3 Day Experience With Lunarpages
I want to tell you guys about my lunarpages experience. First, I found them through a top 10 website review. BIG mistake I understand now. Not really that big of a deal if I can rely on them which is reall all I want. But I don't think I can. First thing I did after creating my account was go to setup my email. I was very excited, this is my first domain ever. I set it up and then find out I can't receive email! After reporting this to their staff and setting up a ticket, I find out the next day that I wasn't receiving email because I had set my mailbox quota limit to 5000mb. Apparently that was too high they said! Why would they give you the option of doing that if it's just going to screw things up? That's just stupid. I knew I didn't need that much but I figured I'd set it and forget it and it would be no problem. Then the next thing was just yesterday when I went to check my website and it was down. And so was their LPCP (control panel). I don't know how long it was down for but I noticed it for about half an hour. I'm still within their 30 day refund policy since I only started the account on tuesday. What do you guys think I should do? Is it commomplace for websites to go down from time to time? I would really appreciate any suggestions you guys might have as a reliable host. Also, how do I go about tranfering my domain name? Do i tell lunarpages I want to cancel first and then tranfer the domain or do I setup an account where I want to domain to go, then cancel?
View Replies!
View Related
KnownHost.com (11 Day Review)
This is an 11 day review of KnowHost.com's Managed VPS (VS2 package). As is customary, my site is MachinaDei.com [url] to verify I am on their servers. Based off my questions here and at another forum, I choose KnownHost.com. [url] I am a VPS newbie and have little experience beyond shared hosting on Linux and Windows. So I wanted a managed VPS and KnownHost.com had very quick and well explained responses to my pre-sales inquiries. It took 3 1/5 hours to get my VPS account from purchase. Which is within the 3-4 hour estimate they state on their site. Setup was easy, especially since I have never setup a VPS before. Since purchasing the VPS account, I have been tinkering around on the VPS and have installed Wordpress MU to test. KnownHost.com support has responded to all my questions quickly. Only once did I put it at "High" and got a response in 10 minutes (better than I expected). One of my questions was about setting up my own backup and transferring it to another server. I set the priority at low, figuring I would have a response back later that day or the next as it was not that big of a deal. I sent the message at 1:39pm Sunday and had a response 20 minutes later. Before I started writing this review, I sent a message asking how to change a regular account to reseller on low priority. I sent my support request at 4:32pm (eastern) and got the response at 4:43pm. I would have been happy with a response in a couple hours. That wasn't to test response speed, I just didn't know the answer... None of my support request have been tough questions, just newbie questions. So I can not attest to what happens if there is a major issue. A friend who works with a server farm at a data center tested a 10meg download file for me and got 1.32 - 1.35 mb/s for download speed. Not sure if that is maximum, but good enough for my use. I was worried that 384meg ram would not run well with CPanel, but so far it has been pretty good. I tend to run at 35-40% ram use on a fairly quite site (high traffic sites are not transferred yet). So figure that is about idle for the VS2 package. I put a PHP script (PHPSysInfo) up to see what my use was at both my shared hosting account (1and1 - stop laughing) and the VPS. Pretty amazed at how heavily used the shared account was! I took a few screen shots of both servers and put in a post on my site. [url] My only critique is the support section needs more information for a newbie. So far that is the only issue I have run into... They do have a good forum to use, but I like reading documentation when possible before asking questions. So I will give two thumbs up to KnownHost.com. If you are considering a managed VPS, I do suggest you give them a consideration. Especially if you are going to need support.
View Replies!
View Related
1paket - Review First Day
I've ordered a server from 1paket with the following configuration: Intel Core 2 Duo 2 x 2,4 GHz, 4 GB RAM, 2 x 250 GB What was delivered to me was only 2GB RAM and 1 x 250GB, I've already sent 2 emails about this matter with no answer, I sent another 2 yesterday and no answer... this is just a WARNING for the people interested in ordering from them... I'll wait for one day and ask them for a full refund, errors like this can't happen, this is bad business, it can work for the people that don't check the hardware and trust the company...
View Replies!
View Related
Server.lu 5 Day Review
This is my Only 5 Day Experience Review: I bought a "brandnew" Server AS2000 on 06/10/2009, i was looking some reviews here about server.lu but i decided to give it a chance. I decided order 2 additional IP address, because i wanted to host 2 Websites with SSL support. this is my ticket: ################################################################ 06.10.2009 - 18.33 i need additional IP address 07.10.2009 - 13.37 i need additional 2 IP address please. 07.10.2009 - 14.25 (Server.Lu Response) For what do you need them ? 07.10.2009 - 14.44 2 sites with SSL support. 07.10.2009 - 16.39 you there ? 07.10.2009 - 17.11 (Server.Lu Response) Hello, i will create an invoice for these 2 IP's. These will cost you 10€ setup and 2€ per month each. Please confirm so we can create the invoice. Best regards 07.10.2009 - 17.37 ok, its fine 07.10.2009 - 19.23 can i have the ips today ? ... 08.10.2009 - 00.44 Im not interested in the IPS, this take too long for a simple 2 IP request, thanks, and the server is DOWN ... ############################################################### 2 Days trying to get 2 IP address........ while this was going on my server was DOWN ############################################################## 08.10.2009 - 00.10 My Server is dead, no reboot no rescue console works 08.10.2009 - 00.13 (Server.Lu Response) We are looking after this. This is not a server issue, but we see alarms on that particular cisco switch serving your box. 08.10.2009 - 00.27 whats going on ? 08.10.2009 - 02.02 this is awesome, server not respond, do you say its some issues related with 'Cisco Switch' and no one can say anything more, i dont interested in your services, please give me a refund, your company is caothic 08.10.2009 - 09.55 (Server.Lu Response) Hello, your server is running again. There will be no refund. Please remind that you opened a ticket at night so respond times are higher than during the day. Best regards. ############################################################### when i was able to acces the server after 11 hours i did single "uptime" , uptime 55 minutes, well they lied about the cisco switch or i dont know, but the NEW server without any use was started their first problems. They refuse to do a refund because they not offer any Refund Policy and they dont offer any Support or any other guarantee, just their Network Uptime. I looking to find a way to get my money back, because i dont want to be in a company who cant handle fine the products they sell. They refuse to do a refund and well im working with paypal to do a clamin in the EU with Root S.A.
View Replies!
View Related
|