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


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

Yum Remove Command

Jul 29, 2008

I had some issues with PHP compilation seems to be issue with zlib. So I decided to remove it. What happened then is something like nightmare...

The command yum remove zlib removed zlib + all dependencies without asking me what to remove. So it removed majority of packages including yum itself.

How can I force yum to not remove dependencies when I uninstall some package?

View 5 Replies View Related

Remove History Command

Nov 25, 2008

Is there any way so that i can remove a specific command from history.

628 ll
629 cat bash.sh
630 man mail
631 exit
632 history

You see my history command displays output as this. I need to remove the 630 th command.
Is this possible ?

I can use history -r but, it will remove all the commands executed in the session.

I need a command to remove a specific thing from history.

View 10 Replies View Related

Cron/ssh To Remove Folders Older Than X Days

Feb 27, 2009

I'm trying to write a cron/ssh to remove recursive folders in a "data" folder that is older than X days.

I've been able to remove files, but not folders.

This is the code I have so far, but if someone can point out how to remove folders older than X days, that'd be great ........

View 4 Replies View Related

Plesk 12.x / Linux :: Cannot Remove PTR Record With DNS Command

Mar 10, 2015

i have to delete all PTR records in over 80 domains in a Plesk 12 panel, when i tried to run the dns command to remove the PTR record from a domain, i got the error :

Code: Unable del record in DNS server: unable find DNS record ...

There is a KB article about this specific problem : [URL] .... , but it refers to older Plesk versions (8.x-10.x). I gave it a shot by copying the fix file from all 3 different versions to /usr/local/psa/admin/plib/api-common/ and i got the following PHP errors:

Code:

PHP Warning: include_once(class.PHostingManager.php): failed to open stream: No such file or directory; File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4
PHP Warning: include_once(): Failed opening 'class.PHostingManager.php' for inclusion (include_path='/usr/local/psa/admin/plib:/usr/local/psa/admin/externals'); File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4

[URL] ......

Is there any workaround this PTR issue? Also, is Parallels going to update the article and provide solution for Plesk 12?

View 4 Replies View Related

PHP Cron Job :: Sh: -t: Command Not Found

Mar 29, 2009

I have this setup on CPanel

php -q /home/host/public_html/clients/admin/cron.php

but I get this:
sh: -t: command not found
sh: -t: command not found
sh: -t: command not found
sh: -t: command not found

View 4 Replies View Related

Random Cron Job Command

Nov 29, 2007

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

Plesk 12.x / Linux :: Remove Backup Via Command Line?

Jan 17, 2015

Is there a command line way of removing Plesk backups?

I'm looking for the command line equivalent of these steps: Log into Plesk as the server admin > "Tools & Settings" > "Tools & Resources" > "Backup Manager" > check a backup and click "Remove".

We have a script that copies the contents of "/var/lib/psa/dumps/" to Amazon S3 for long-term storage of backups. It runs nightly after a scheduled Plesk backup. Once that script completes successfully, we'd like to delete the Plesk backup to free up disk space. We have Plesk's "Maximum number of backups in the repository" set to 1.

But Plesk appears to keep that backup around while creating a new backup (which makes some sense). This is causing us trouble because the server does not have enough disk space for two backups. As a temporary solution, I'm manually deleting the backup each day through the Plesk admin, but would like to automate it if possible. If automation is overly complex/risky, we'll look at upping our disk space instead.

View 4 Replies View Related

Issue With Cron - GET Command Not Found

Apr 13, 2008

after domain moved to new server we receive this email alert when cron job run (set under cpanel)

/bin/sh: GET: command not found

View 14 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 - 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 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

Mail Command Not Working

Nov 25, 2008

I am trying to send mail using mail command with a subject using below.

mail -s "subject" me@domain.com or mail -s "subject" "me@domain.com"

Both are not working... It simple hangs for a long time. Nothing happens.

Then i tried sending mail using mail -v and then entered the subject, when it prompted.

It works fine.

I also tried mutt -s "test" -a

it also not working...

View 7 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

How To Remove Apache File Not Exist Errors

Oct 31, 2009

How to Remove Apache File Not Exist Errors

Here is the Reply of the Sys Admin

Dear Customer,

I am sorry. We are not able to resolve the File Does Not Exist errors for you. You have to do it own.

The unique errors that you have today for Apache are as follows:

client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind
File does not exist: /usr/local/apache/htdocs
File does not exist: /usr/local/apache/htdocs/501.shtml
File does not exist: /usr/local/apache/htdocs/images, referer:
[url]
File does not exist: /usr/local/apache/htdocs/jailbreak-iphone-3-0-1-with-redsn0w
File does not exist: /usr/local/apache/htdocs/robots.txt
Invalid method in request x16x03x01
Invalid method in request x80bx01x03x01
# Invalid URI in request alt="Follow%20via%20FreiendFFeed"%20title="Follow%20via%20FriendFeed"%20border="0"%20height="16"%20width="16"%20/>Home
Top%20StuffiPhoneWindows%207FirefoxVistaTipsWordpressSubscribeSitemapAdvertise xc2xa0xc2xa0xc2xa0Vertical1240899%20=%20false;ShowAdHereBanner1240899%20=%20true;RepeatAll1240899%20=%20false;NoFollowAll1240899%20=%20false;Ban nerStyles1240899%20=%20new%20Array(%20%20%20%20"a{display:block;font-size:11px;color: HTTP/1.1
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
PHP Fatal error: Call to a member function get() on a non-object in /home/technob2/public_html/wp-includes/cache.php on line 93, referer:
[url]
request failed: error reading the headers

I would advise that you resolve as many of these errors as you are able.

As to what caused the load on your server, I can't say. There is nothing in your logs to indicate the source of the problem. During the 1PM period when your server overloaded last there were only 29 errors in Apache. The errors that occurred during this time would not cause excessive load.

I have installed a script to monitor your server. If this load issue occurs again within one week or before your next reboot, whichever comes first, we should be able to determine the source from the script's logs in /var/log/sys-snap.sh.

View 14 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

File Details Command

Jan 12, 2008

How do you get the file size/details of a file through ssh?

View 4 Replies View Related

Plesk 11.x / Linux :: Redo Default Templates - Skeleton Command Not Working?

May 27, 2014

We're attempting to redo all of the Plesk default templates. I created my skel file (.zip), uploaded it and run the command as noted here [URL] ....

The CLI sites for a moment and then I am dropped back to command line. It seems to have worked...but, is not.

View 5 Replies View Related

How To Set Up Cron Job To Replace Index File Every 3 Hours...

Apr 18, 2007

I would like to replace my index file every three hours, with a specified file on the server thats in a different folder (someone keeps putting unwanted stuff in my index file) Can someone explain to me how this is done?

View 2 Replies View Related

SCP Command For Transferring Large File

Mar 26, 2008

Can anyone tell me the format of SCP command for transfering an 18gig TAR.GZ file from one srever to another

say im logged in to the old host via SSH and the backup is located at /home/public_html/cpbackup/blahblah.tar.gz

what command would i put down to transfer to the new server

View 3 Replies View Related

How To Use Wget Command To Download .htaccess File

Jul 1, 2008

I just want to use wget command to transfer data from a shared host to dedicated server.Anybody knows how to set wget to download the .htaccess file and keep the file/directory's permission the same as they used to be on the old server?
I only knows these:wget -b -c -r -l0 -np -nH -t0

View 5 Replies View Related

Plesk 11.x / Linux :: Setting Up Cron Job For Domain User - No Such File Or Directory

Apr 20, 2014

Can't get it working, I want to set up a cron job for a domain user, but seems that there's a problem to find the php executable. The command is:

Code:
/usr/bin/php/ -f /var/www/vhosts/thedomain.com/httpdocs/test.php

But the report says

-: /usr/bin/php/: No such file or directoryClick to expand...

View 3 Replies View Related







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