Cron - Not Working - Apache

Jul 4, 2007

I did not realize the significance of the Apache sub-forum. I thought perhaps this would be a more general Server management query, but I realize now I should have posted in Apache forum.

I have been banging my head against the wall for the last couple of days trying to get cron jobs working. It's actually making me quite depressed, a lot of people are waiting on me to get this working, and for the life of me I see no light. I'm not a stupid person, i'm a PHP developer, and have some linux skills. This is the single most annoying issue I have had to deal with simply because I cannot find any troubleshooting methods to my issue.

I have tried every different combination of command under the sun and I cannot get any sign that the cron is running the commands.

I own a "virtual" dedicated server with a hosting company, I have full root access. Linux / Apache

The script file is a PHP file which simply mail() an email saying that cron is working, I am yet to receive this mail that was executed by cron.

I have ensured there are no errors in this simple PHP file, I have executed the script from the shell and all is well there..

So, firstly I tried to setup the cron table from CPanel, on the account where the script resides.

I used the following command combinations:
Code:
0-59 * * * * /usr/local/bin/php /home/username/public_html/cron.php
0-59 * * * * php -q /home/username/public_html/cron.php
0-59 * * * * php /home/username/public_html/cron.php
0-59 * * * * cd "/home/username/public_html/"; php cron.php
0-59 * * * * wget [url]
with time combinations of:
* * * * *
to get the command to be executed evey minute, for testing purposes.

All these commands work fine when executed through the shell.

I set the mail address for cron output to be my mail address also.

I do not get any mail from cpanel with an overview of the cron executions.

I then gave up trying to get cron to work on that account, and decided to go root.

I logged into the shell via root, checked the cron table for root. I edited the root cron table (that contains commands for various cpanel scripts etc) to include a command to execute the php script, even with the script residing on the root directory.

I also added MAILTO="myemail@email.com" to the first line of the cron table.

I do not get any emails of the cron actions.

How can I check if the cron scheduler is working when I get no sign that the cron commands are being executed, and when I do not receive any cron emails? What methods are there for me to troubleshoot this issue?

Could it be possible that cron shedular is not active on my server?

I have lurked the net with great detail to find any method to troubleshoot my issue, and all the related pages I find are to do with troubleshooting the commands. I know my commands are fine, there is some other issue here.

View 2 Replies


ADVERTISEMENT

Cron Working But Command Isn't ?

Jun 27, 2005

I'm needing some info i have been pulling my hair out for hours trying to get some cronjobs lined up i started out with knowing nothing about it and i'm a little better off now i got the cron running but the commands aren't executing so maybe someone can help me figure out why i would greatly appreciate it

Here's The deal I telnetted in set the following crontab ...

View 4 Replies View Related

Cron Quit Working...

Oct 6, 2007

I have a dedicated CentOS 4.5 Server. However, as you can probably guess I am new to linux and managing a server...

Anyway, beginning of this month my crons quit working, I still receive emails as if they are ran but I can't get the scripts to actually execute.

I have not touched the crontabs or anything prior to them not working, they simply quit working... I did not notice immediatly they did not work, I am guessing that it was around the time of which I rebuilt apache to a new version of PHP. Today I tried changing them to "php path/to/script.php" and I also tried "path/to/php /path/to/script.php", neither worked.

Any ideas or suggestions as to how I can fix this?

View 9 Replies View Related

Cron Job Not Working Properly

Jun 9, 2007

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 4 Replies View Related

Logrotate Cron Not Working

Jun 19, 2007

I recently purchased a new dedicated server, since I have had this server (8 days) I have being receiving the following email:

Quote:

/etc/cron.daily/logrotate:

error: error accessing /var/log/httpd: No such file or directory
error: httpd:1 glob failed for /var/log/httpd/*log

View 9 Replies View Related

Cron Job Not Working, Restart Services

Jan 1, 2008

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 2 Replies View Related

Cron Not Working On CPanel Server

Nov 9, 2008

How do I make sure that there are cron jobs running on my cPanel server? I have root access, etc...just not sure why my crons aren't running. Nothing weird going on.

View 7 Replies View Related

Cron As Postgres User Not Working

Jun 14, 2007

I was hoping someone could shed some light on a cron related issue I'm having.

I've been using linux for a while...but never really used crons.

My cron is supposed to dump a postgres db in tar.gz format every minute (for testing purposes) but it doesn't.

I opened my cron in vim via:

Code:
postgres@myhost:~$ crontab -e
And here's the cron:

Code:
* * * * * /usr/bin/pg_dump -D warranty_1_6_test | gzip -c > /var/www/test/postgres/backup$(date +"%Y%m%d_%H%M").tar.gz

Also:

Code:
postgres@myhost:~$ ls -lah /var/www/test/postgres/
total 8.0K
drwxrwxrwx 2 postgres postgres 4.0K 2007-06-14 12:01 .
drwxr-xr-x 3 user user 4.0K 2007-06-14 11:47 ..

Running the backup command via CLI works fine.

View 5 Replies View Related

Cron Command Remove File Not Working

Jan 1, 2007

I have edited /var/spool/cron/root file

and I've added this line:

*/1 * * * * rm -f /tmp/*.pl

and I have created file lol.pl

and after 10 minute file is still there, why?

View 4 Replies View Related

Plesk 12.x / Linux :: Cron Job Working On Console But Not Automatic In Task Manager

Aug 19, 2014

i have setup fresh Centos 6.5 with Plesk Pannel 12.0.18. When i execute the attached command from the console, i get it work, some posts are auto created within wordpress. When i enter the attached command within Plesk (Tools / Settings - Taskmanager - root New Task, the command is not executed...

/usr/bin/wget --post-data='id=4&minposts=1&maxposts=3' -O /dev/null http://www.mydomain.com/wp/wp-content/plugins/WPRobot3/cron.php?code=UNIQUEID

I tried also without /usr/bin at the beginning, but its not working with cron automatic

View 3 Replies View Related

Auto Restart Apache On Cron

May 22, 2007

ive got a fairly beefy server but at the moment its hosting alot of resource intensive sites (unfortunatly i dont currently have a choice on where to run them all) and apache is crashing to the point its taking upto 2 mins to load pages within about 24hours but once restarted is fine again. so im wondering if anyone can suggest a way to automaticly restart apache via a cron job every 24hours or so?

View 6 Replies View Related

How To Add Cron To Restart Apache Server Every Three Hours

May 5, 2008

My host is experiencing "issues" with my WordPress. It keeps going above their upper limit of open MySQL connections. So, while I am diagnosing it, I need to restart the server every few hours to avoid it going down.

How do I write a cron to restart Apache every 3 hours?

View 5 Replies View Related

Apache Not Working

Mar 2, 2007

I am currently using cPanel 11.0 E360 build.
Apache 1.6.9

This morning, I used the "Modify Apache Memory Usage" , as suggested by csf/lfd.

However once it is installed, my Apache can not be started/restarted.

Is there a way to uninstall the Apache MemLimit script?

View 7 Replies View Related

SSL Not Working On Apache 2

Nov 19, 2007

I have Fedora Core 6 with Apache 2. Im trying to generate a local SSL certificate but the folders ssl.key and ssl.crt are missing from the /etc/apache/conf folder. I installed mod-ssl and openssl and still same issue. What am I missing? Im installing everything through yum. I searched the whole drive and there is no folder called ssl.key or ssl.crt anywhere on the system. And right now I cant get port 443 work via the virtualhost config in httpd.conf:

NameVirtualHost *:443

<VirtualHost *:443>
DocumentRoot /var/www/html/mainsite
ServerName mainsite.com
</VirtualHost>

After restarting apache and going to the mainsite via https it gives me the normal this is not a trusted certificate, I click ok and it takes me to /var/www/html/ instead of /var/www/html/mainsite. I was assuming because I dont have ssl setup correctly.

View 3 Replies View Related

Apache :: 127.0.0.1 Not Working

Jul 8, 2013

I run mac os x mountain lion and have been using apache for at least a week now. But, out of no where, when i tried to acces my index page on 127.0.0.1, i get this error : "Oops! Google Chrome could not connect to 127.0.0.1". I've looked into my httpd.conf file and everything seems to be fine.

View 5 Replies View Related

Apache Is Working But Can't Login To Whm

Mar 7, 2008

I have a problem with my server: all my websites are shown correctly but when I try to login to the website's cpanel I get an "Unable to connect" page.

I tried to restart named and httpd but still no results.

If I restart my server I know that it will be fixed but I would like to see what I can do before restarting the whole server

View 3 Replies View Related

Ftp Not Working After Moving To Apache

Oct 5, 2008

to running my on vps it running on lxadmin i was running on lightptd

but i move to apache beacuse i need it for mod_write

but now i cant login to my ftp

i get this

Response:SSH-2.0-OpenSSH_4.3
Error:Cannot establish FTP connection to an SFTP server. Please select proper protocol.
Error:Critical error
Error:Could not connect to server

View 8 Replies View Related

Apache Not Working With This Error

Apr 2, 2007

*** glibc detected *** double free or corruption (fasttop): 0x09f9f508 ***
*** glibc detected *** double free or corruption (fasttop): 0x0949e508 ***
*** glibc detected *** double free or corruption (fasttop): 0x08a8b508 ***

What does this mean>? i tried rebooting and restarting.. but no go..

View 2 Replies View Related

Apache :: Removing Www And PHP Not Working

Dec 10, 2013

So I insert following code in my apache.htaccess file in order to remove www and php.This is my whole file

ErrorDocument 500 /500.phpErrorDocument 404 /404.php# force non-www domainRewriteCond %{HTTP_HOST} ^www.example.com$ [NC]RewriteRule (.*) http://example.com/$1 [R=301,L]#RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ $1.php [QSA,L]

View 1 Replies View Related

Apache :: Docroot Not Working

Feb 27, 2014

I am on the move from Windows 2003 to SLES 11. Bit by bit I get the system up and running and to do, what my windows server is yet doing for me.I have a question about apache's default docroot. I possibly have messed up my installation in some way.

The default docroot is still /srv/www/htdocs according to webmin and yast.I have a virtual host in the directory /srv/intranet.I have installed phpMy Admin in /srv/www/htdocs/phpMyAdmin

Now. My Intranet is working fine - no problem.

Then I have managed to get php running and through doing this, I have found out, that every http request to my apache server ist redirected to my intranet. Therefore I cannot use http://server/phpmyadmin to get to the login page of phpmyadmin - this attempt results in "object not found"

To get to the bottom of it I have created another virtual host pointing directly into phpmyadmin's directory to see wether phpmyadmin ist working at all - and it does!

So I have created an info.php with the usual "phpinfo()" in it and found out, it is only accessable and working if I place it anywhere in the directory of my intranet.

If I place it in /srv/www/htdocs (where I would like it to live...) and try to access it through a browser by typing http://server/info.php it results in "object not found" I have asked Dr. Google lots of questions about it, and I came across quite a few hints and tips and followed them. But so far everything seems to be configured the right way but still apache is misbehaving...

View 2 Replies View Related

Apache :: 301 Redirect Not Working

Jul 29, 2013

I'm having trouble getting a Redirect to work. I'm doing a remake of an old site that I did over 10 years ago and I'm going to need to do a lot of redirects once I change over, but I wanted to test it out to make sure I know what I'm doing before I get rid of the old site. My current old site is www.antstuff.net. I will be keeping the same domain when I change, but it's current url naming system is different from the program I use now (Joomla). It's current url syntax goes like: www.antstuff.net/html/ant_farm.html Whereas the remade Joomla site will simply be www.antstuff.net/ant-farms . I don't want to lose all of my inbound links so I'll need to redirect every old page to the new pages right?I wanted to test it first to see if I could get a redirect to work so I added a line to my .htaccess just to try and redirect from one page to another.

Redirect 301 /html/ant_farm.html http://www.antstuff.net/html/queen_ants.html

Nothing happens. It does not redirect to a different page at all.Also, there is a bunch of other crap in my .htaccess file that has built up over the years. Could that mess anything up?

Update: Interesting thing happened. When I went to submit this post, I got an error that said that there is a redirect in the url that I entered, please use the destination url instead. So I removed the line of code from my .htaccess before submitting. Nevertheless, nothing happens when visit that particular page. It's supposed to transfer me to the other page right? 

View 2 Replies View Related

Apache Is Working On Your CPanelŽ & WHM Server

May 26, 2007

I was changing IP Addresses on one of my domains on my VPS to a spare fresh IP.

Since doing this, my DNS hasn't fully propgated, so I'm then facing this message.

Apache is working on your cPanelŽ and WHM™ Server

Now my question is, how do I change this default green Cpanel page? Could I swap it with my own page?

View 5 Replies View Related

Apache :: SSL Requests Stop Working After A While

Sep 29, 2013

I have Apache 2.4.2, OpenSSL/1.0.1c, on Windows Web Server 2008 R2 (64 bits)

After 12 hours of heavier load, the SSL requests stopped working/being answered. However if you requested the same page via http instead of https, it worked fine. Restarting the Apache server fixes this, for a while. Again after a few hours of traffic, the https requests stopped working again. I checked the logs, and nothing notable, the mod_ssl entries just...

The site is called only by client developed with Delphi 2007 (CodeGear user-agent). Delphi client use THTTPRIO for sending HTTPS request to SOAP.

View 9 Replies View Related

Apache :: 2.4.3 - SSL Requests Stop Working After A While

Dec 13, 2012

So I just upgraded Apache 2.2.22 to Apache 2.4.3 and made sure to go through all the options that had changed and update the conf file accordingly. This included adding the cache module for SSL and changing the SSLMutex option over to Mutex default ssl-cache. We also turned off SSLCompression due to the CRIME attack vulnerability.

We use apache strictly as a loadbalancer to 2 tomcat servers via mod_jk. Apache serves no static content at this time.

After being deployed, everything worked fine until later in the day. After 3 hours of heavier load (our site only takes significant traffic during business hours), the SSL requests stopped working/being answered. However if you requested the same page via http instead of https, it worked fine.

Restarting the Apache server fixes this, for a while. Again after a few hours of traffic, the https requests stopped working again. This time I turned the loglevel up to debug and restarted the Apache server.

As traffic slowed down it took another 6 or 7 hours before SSL requests stopped working again. I checked the logs, and nothing notable, the mod_ssl entries just... stopped. (I don't know for sure its ammount of traffic related, it just seems that way)

I have tried reproducing this in a lab, but have not been able to get it to happen on the lab server.

OS: Windows Server 2008 R2
Apache: 2.4.3 vc9 build with OpenSSL 0.9.8 downloaded from apachelounge.org
Mod_JK Version 1.2.37 vc9 also downloaded from apachelounge.

View 10 Replies View Related

Apache :: Facebook OAuth Not Working (sometimes)

Jul 30, 2013

I have a really weird problem with using facebook authentication (OAuth 2.0) for a node.js driven website. I am using passport.js as authentication middleware.

I am running the express.js server behind an apache using the following rewrite rules (my .htaccess file):

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} =mydomain.com [OR]
RewriteCond %{HTTP_HOST} =www.mydomain.com
RewriteRule (.*) http://localhost:62666/$1 [QSA,P]

The weird thing is, i can login via my facebook account, my client can't. It yields an internal server error with no error_logs appearing.

On my old server I solved this problem by increasing the buffer size of ngnix (which seems odd), so I figured it has to be a http-server issue. The use of nginx is absolutely no option on my new platform, nor is increasing the buffer size. I'm really kind of lost here.

View 1 Replies View Related

Apache :: 2.2.22 Not Working Via HTTP Only Via HTTPS

Mar 3, 2015

I'm using a turnkey image for smallmachineforum system, installed on amazon aws instance.

In the default configuration I can't use the http version of the site, only the https.

It does not seem to be a network issue, a telnet on port 80 opens.

The server is apache version 2.2.22, on a Debian 3.2.57-3+deb7u2 x86_64

View 2 Replies View Related







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