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 ...
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?
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?
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.
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...?
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.
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...
I am having Virtuozzo vps with cpanel/WHM installed.I have created some accounts in it by setting disk quota . Now the issue is : some users are using space over the allocted one ,when i use the command quota -u (username),i can see that the users are used the space over the allocated one and they are still allowed to upload file . How to fix this issue ?
I am having a very strange problem with 2 different cPanel accounts on a server with 500-600 accounts. For some reason after a day or two the mysql username/password stops working. We have tried changing the MySQL user and the password with no success. The log does not indicate that the MySQL password was changed in any way. Only these 2 accounts are affected and this problem occurred at least half dozen times each.
Again: these are two different accounts with 2 different MySQL users that after a while stop working (I am unable to determine if they stop working at the same time b/c they belong to different customers). When we reset the user (with the same pass) it works for a day or two. I have checked to connect not only from PHP but also from shell when it's down: it also doesn't work so this is a pure MySQL problem.
I have a server running Cpanel and I have added postgres through /scripts/installpostgres, also I have set it over WHM and can access phppgadmin but I got this error when connecting throug a script
Fatal error: Call to undefined function: pg_connect() in /home/rer1223/public_html/process/Connection.php on line 4
I checked and postgres is not listed in phpinfo output.
The issue is that I have with me a 1.5GB SQL dump from Postgres 8 which I extracted using pg_dump.
Restoring it seems to be an issue on this PC. I've tried modifying memory directives in postgresql.conf as well as the kernels SHMAX value but no go.
I tried a bunch of other things such as gzipping the file so that it was only 100mb and doing:
Code: gunzip -c dump.sql.gz | psql my_db But I recieved many errors saying "invalid command N" and I also got a syntax error notice and the process terminated.
I tried to at least try and enter some data manually but vim is incredibly slow since this is a 1.5GB file.
Is there a way I could perhaps split up my db dump and then import them into the db one by one?
i had to do a file system back up because of the size of my database.
i shutdown postmaster and tar'd the files.
i recently reloaded my OS and now i'm attempting to restore the backups. i first shut down postmaster, restored the backups to the data folder and restarted postmaster.
i then su'd from root to postgres user:
Code: [postgres@austin1 pgsql]$ psql service_2_3 psql: FATAL: database "service_2_3" does not exist DETAIL: The database subdirectory "base/16385" is missing.
the backups had a database named service_2_3 but upon restoring the backups, it doesn't seem to be available.
my data directory is /var/pgsql/data.
Code: [postgres@austin1 pgsql]$ ls -lahR /var/pgsql/ | grep 16385 but that yielded nothing.
have i done something wrong while backing up? i don't think i have since i followed the postgres manual when backing up. but the administrators have not been very thorough with how they've set the system up for me.
how i can resolve this issue if you have the time.
I just reloaded the OS on our production server and I'm having issues configuring postgres.
the user postgres exists in the system (i.e. 'su postgres' switches me to that user) i attempted to connect to my database 'service_2_3' via CLI:
Code: $ su postgres $ psql service_2_3 and i recieved the following error:
Code: psql: FATAL: IDENT authentication failed for user "postgres@service_2_3" the database is installed on the machine on which i was attempting to connect to it with.
therefore, i edited my pg_hba.conf so that it looks like this:
Code:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only local all all ident sameuser # IPv4 local connections: host all all 127.0.0.1/32 ident sameuser # IPv6 local connections: host all all ::1/128 ident sameuser host all all 0.0.0.0 0.0.0.0 password
I thought I knew enough about my .htaccess stuff to do this, but I can't seem to work it out. What I want to do is if a user visits domain.com/folder, we check to see if the folder exists. If so, show as normal (IE domain.com/support)
If a user visits domain.com/dynamicusername (dynamicusername is not a physical folder), redirect to dynamicusername.domain.com
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: ...
when I find the subscription from the admin side of PPA, if I select "Login as user" I've noticed that it is different from actually logging in as the user - for example - "add domain alias" is missing when I login as a customer - but not as an admin... I need my customers to add their own aliases and manage them - how do I add that feature to the client login side?