crontab

Email Alerts on saved searches, procedure and safety/performance tips&tricks?

I built an email alert for my users (now are only 2,000) so every night a crontab execute a php script that query the mysql to find matches with user's saved search. it's a classified website in my case, but i would like to learn in case i had to build something for bigger clients my concerns are: what happen if my user grow x10 or x...

Insane crond behavior. keeps making defunct bash processes

I have a crontab that looks like: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 0-59 * * * * /var/www/html/private/fivemin/zdaemon.php >> /dev/null & Simple as possible, right? zdaemon.php which I am just testing with is: #!/usr/bin/php <? while(true){ sleep(1); } ?> Whenever it runs it hangs li...

Why does crontab throw error: "illegal action"

Hi, I entered some cron jobs, everything saved correctly (jobs added) I then went back and typed crontab -e to adjust something and I got a message: "illegal action" I also get this when typing crontab --help or crontab Wow...now when I open my terminal, I get: Could not open a new pseudo-tty. ...

subprocess.popen seems to fail when run from crontab

Hi All, probably a daft question but.... I'm running a script from crontab that will just ssh and run a command and store the results in a file. the function that seems to be failing is subprocess.popen Here is the function def _executeSSHCommand(sshcommand,user,node): ''' Simple function to execute an ssh command on a remo...

Database driven 'scheduled tasks' application in C# - need some advice re cron syntax

Hi all, For a work project I am undertaking a task that will see me create a C#.NET Windows Service that will run 24/7. The program will essentially simply move files (based on a given path and a regex) between various locations - from/to HTTP, Network Paths and FTP. The administrator will schedule these jobs via an administration page...

Run a cronjob where the file is inside a password protected directory

Hello, I am using cpanel standard crontab set-up, I have the path to the file correct but the path leads to a password protected directory ie: *php /home/example/public_html/admin/script.php* admin is password protected, how would I allow the crontab access to the script? Thanks in advance. ...

Cron running but functionality not working

I have several PHP files to be run by cron. I set up the crons using command- crontab crontab.txt Inside the crontab.txt file, I have written cron commands like this:- #(Updating tutor activities) - every minute * * * * * /usr/bin/wget -O - -q -t 1 http://project/cron/tutor_activities.php But none of the functionalities are working...

How to supply password in crontab

I am writing the command in crontab and its output is first asking the password. Is there any way to supply the password with command like mount -a < password ...

How does cron internally schedule jobs?

How do "modern" cron daemons internally schedule their jobs? Some cronds used to schedule a run every so often via at. So after a crontab is written out, does crond: Parse the crontab for all future events and the sleep for the intervals? Poll an aggregated crontab database every minute to determine if the current time matches the sc...

Cannot get a Cron event to fire on my Linux server.

I have a Amazon EC2 Linux micro instance server that I need to fire an hourly process on. I have chosen to use crontab and cannot get it to fire. I placed a *.sh file in the /etc/cron.hourly If I run $ sh /etc/cron.hourly/notify.sh the script behaves as expected. I have checked to see if the cron service is running and it is. I have...

How to stop all instances of cron?

I have a cron job that executes a rake task in rails. I noticed in the log that it was running the task 4 times everytime it was executed. The problem is that there are 4 instances of cron running. I ran: /etc/init.d/crond stop And now there are only three. Running: ps -ef | grep cron I see this: root 1029 1 0 Oct20 ?...