I am trying to edit crontab using crontab -e, I seem to get to it okay but I am unable to edit anything in there, at the end of the file there are ~ in there, and I cant even delete them. Its like the file is locked.
1) #> nano /var/spool/cron/root Then type in the cron entry and save it #> service crond restart It cannot work if have not restart crond
2) #> crontab -e Then type in the cron entry and save it
3) #> nano /etc/crontab type in the cron entry and save it
I can use above three method without any problem.
However I cannot use crontab [filepath] method
4) #> crontab /home/admin/domain.com/www/testing/crontab.dat *crontab.dat is a cron entry. after type in this line, I use crontab -l and see cron entry has been added to /var/spool/cron/root However, the cron job will not run even I restart crond.
A few days ago, all cron jobs stopped working, probably because of a certain setting that my host changed. I contacted my host, and he replied that the format i'm using for the commands was not proper, and he gave me the proper command as:
I tried it, but it didnt work....
I googled the problem and got tens of commands... i simply wanna run a PHP file (the file itseld is functional if i browse it) every now and then, so what is the command i should be using?
also,i m looking for a specific cron right now (xbt_cron).once i find it ,what command do i use to run it manually.its supposed to run by itself..i just moved to a new server last week and now its stopped working.
Anyone can explain what are the purpose for these command, and should I make any changes to these to standardize them all (the time)
Secondly, one of my server doesn't set any automatic CPanel updates, so I set automatic updates for CPanel packages and Security packages. Is it suppose to add "/scripts/upcp" into my crontab? Most of them are also at different time.
I assume this command is to inform me whenever my user make a new domain add-on? /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
Also can anyone tell me what are the purpose of these? /usr/local/bandmin/bandmin /usr/local/bandmin/ipaddrmap /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1 /scripts/exim_tidydb > /dev/null 2>&1 /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
I set up a cron to run every minute & I'm running a PHP script by way of cron like
Now does each request of Cron is a seperate HTTP Request or what? Say my script takes more than 1 minute to execute completely but before its completed, its called again. So, will that effect the PHP script running because of previous HTTP Request or will it create a new HTTP Request & let the previous request finish its operation? Technically, it shouldn't block/affect the previous request, but I'm not sure!!
I noticed on my new servers users doesnt have crontab permission.On my first server they have access.So what i need to do to enable users crontab permission automaticly on new servers?I have whm/cpanel there but it seems there is nothing about it there.
I am trying to setup a cronjob but cPanel, (Linux Centos 5), tells me that user/bin/crontab permissions are incorrect and need to be changed to 4755 - I try to change permissions in WinSCP [Properties] but it doesn't 'take'.
how to force a change of permissions with SSH (Putty)
I have root ssh access to a server and we notice when doing a bash ./mysq-backup script to dump the data from the web site's databases into .sql and .tgz them that httpd goes down sometimes. That, and sometimes it seems that httpd goes down in other situations. All fine, we will figure out why. But ..
It would be nice to run a crontab to check every 15 minutes if httpd is running, if not, to restart it.
Right now I when I notice the site is down I log into the ssh as root and type: service httpd restart. If it is up it will then first stop it, and restart it. I can look at the screen and see it happen, so I feel pretty safe doing this. One of my concerns is that when I am not at the screen and it stays down .. I do not notice this and downtime increases. And we don't want to just crontab service httpd restart, so a bash script to check for the pid and restart if it down .. would be nice.
I thought this would work: (chmod 755 httpdcheck)
Code: delta:~ root# cat httpdcheck #!/bin/bash
if [ ! "$(pidof httpd)" ] then echo "Could not find pid of httpd - restarting" service httpd restart else echo "Found pid of httpd - NO need to restart" fi delta:~ root# And I have this crontab entry:
Code: delta:~ root# crontab -l */5 * * * * /root/httpdcheck | mail my@email delta:~ root# When testing, I did service httpd stop and waited 5 minutes and I received the email : could not find it, restarting. But when I go to the web site in browser it remains down. I have to login to ssh and do service httpd start manually to really load it.
Manually loading btw .. shows it works as bash script just fine, so I dont't know why it won't work when run from cron?
Code: delta:~ root# ./httpdcheck Could not find pid of httpd - restarting Stopping httpd: [FAILED] Starting httpd: [ OK ] delta:~ root#
So .. when is it going wrong? Am I forgetting something?
I keep receiving this error message from my server.
I checked with my system admin, they told me it is ok.
Any opinion here ? S.M.A.R.T Errors on /dev/hdc From Command: /usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/hdc Please note the following marginal Attributes: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 190 Unknown_Attribute 0x0022 074 040 045 Old_age Always In_the_past 250116374554
In my linux vps i am using WHM and enabled tomcat hosting for one of virtual host ,the tomcat shows 404 error for .jsp pages,remaining virtualhosts are working properly.When i view the log file i found the following line,
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[vhost].[/] has not been started
In above line vhost is domainame.How to solve this issue?
I'm trying to use cPanel API to grab my disk space usage and I'm getting the following error - I'm using cPanel API.
Warning: fsockopen() [function.fsockopen]: unable to connect to mywebsite.com:2082 (Connection timed out) in /home/mywebsite/public_html/cPanel.php on line 53 Disk Space Used: 0 MB This is my small test code (my real login parameters removed): include "cPanel.php"; $cPanel = new cPanel('mywebsite.com', 'username', 'password', 2082, false); echo 'Disk Space Used: ' . $cPanel->getSpaceUsed() . ' MB<br>';
i have a dedicated server with CENTOS Enterprise 4.6 i686 on standard i have main problem that there is an account on my server that the password can enter the FTP account normally but not enter the Cpanel i see that if the coanel pass is 951753 he can not log in the cpanel but can enter FTP why this problem ? and how to resolve it