Tag Info

Hot answers tagged

2

include(../scripts/connect.php) Your script is using a relative directory. These are linked to the current working directory. When cron is running your CWD is almost certainly not what you think it is. Either set the CWD in your cron script, or update your PHP code to use use a path relative to themselves. Something like ...


2

The permissions on /usr/bin/crontab should be: owner=root group=root perms= 4755 (rws rx rx) Your /usr/bin/crontab has the wrong group owner. Additionally, it has sgid and NOT suid which it must have.


2

To kill all processes for the user, you have a few options. I like: su - username then kill -9 -1 To see which "cron" processes belong to user : pgrep -u username cron To kill those processes: pkill -u username cron


2

You need to use the full path to python eg /usr/bin/python you can find out the path with which python So your crontab entry would look like 0,30 * * * * /usr/bin/python /home/user/tunnelTest.py


2

Cron doesn't send the output from jobs to a temporary file. Instead it invokes the mail command once it sees any output from the job and copies the output directly to mail's input. Confirmed this by checking the source for Vixie cron but others will probably do the same.


1

A major problem with all kinds of CMSs are that they are or will be exposed to attacks - especially Wordpress is favorite target. My suggestion will be not to only look at MySQL logs, as you probably only will find the database to be filled up with connections, but look into your web logs aswell. Usually you could try searching for "POST" which in any many ...


1

Use: kill -6 $(pgrep -U username cron) You can search with pgrep full string with "-f" arg if you need to kill specific cron jobs, while let others live. kill signal is pretty dangerous really, so you should check what you are going to kill. If username is 'root' then you can kill important things, yes.


1

test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) This runs the test command, and then only runs the ( cd ...) sequence if the test command failed. If anacron is installed, then the test command would succeed, and the rest of the command line wouldn't run. In other words, this line only executes cron.daily if anacron isn't ...


1

One way to do this is to use PHP's $argv array that is available in CLI scripts. Example cron: * * * * * * /var/www/mysite/folder/foo.php 1 In your php file $argv variable will be available where $argv[1] (Second element) will be the supplied argument. So if you can modify this scrip to work with $argv, then this is a good solution. If you HAVE to use a ...


1

You are confusing the share directory for php and the php binary. The file you should use probably is /usr/bin/php. The path for your script is probably wrong too, as @jin-pow told you. You may have to use /var/www/whatever/foo.php. And if you run it passing ?query=1, it will not work, as PHP will complain that he will not be able to find the script. And ...


1

You might check what's in here: /etc/cron.allow and also see if selinux is running and causing the problem. Poking around /var/log/messages or syslog is recommended.


1

You need to enable the user to use cron in the login access control table file /etc/security/access.conf Use the following entry which will allow the coins user to run cron jobs: # Allow the coins user to run cron jobs +: coins : cron crond :0 Ensure it is above the last entry: # Deny all other users access by any means. -: ALL : ALL As this entry ...


1

Is that the entire script? There's no 'shebang' line add #!/bin/bash to the first line if it isn't there already. Also did you mark the file executable?



Only top voted, non community-wiki answers of a minimum length are eligible