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
ADVERTISEMENT
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Apr 30, 2007
Is there a command i can type into the ssh console to stop a current transfer that i started wit the wget command?
the file im wgeting always stuffs up at 51% but then the server just retries and starts again, its done it 3 times so far and i just want to completely cancle the process if possible....
View 9 Replies
View Related
Apr 24, 2008
I have a domain with a few forwarding email accounts that forward to mac.com email accounts... for some reason every once in a while these accounts stop working...
This is the error I get when I email to that account:
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: ...
View 9 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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