cron

Need advice on cron job'ing a very large process

I have a PHP script that grabs data from an external service and saves data to my database. I need this script to run once every minute for every user in the system (of which I expect to be thousands). My question is, what's the most efficient way to run this per user, per minute? At first I thought I would have a function that grabs all...

Weird Cron ls Behavior

I have a Python script that is running a few ls commands. This script runs under cron all day. I use awk to write out the column that the filename is in when ls -l is executed. When I run the script via command line the output looks like this -rw-rw---- 1 mysql adm 141 2010-03-25 08:56 mysql-bin.000485 -rw-rw---- 1 mysql adm ...

compiling boost based application using cron

Hi All, I am building some boost based application for various embedded targets. I have developed a script which can build my application with different toolchain for several targets. This script works fine when I run it from command line but if it is invoked from cron it always fails to link the object files. My application has depende...

config file in schedule.rb with Rails Whenever gem?

I have a file called config.yml in my /config folder of my rails application. I also have an initializer: config/initializers/load_config.rb with the following code: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml") I am using the Whenever gem to set up a cron job, and would like to use my APP_CONFIG to call a function li...

Use the Twitter API to run a script every time I post a new tweet

I have a PHP script on my server that I want to run every time I post a new tweet to Twitter. Is there a way to automate this? I could of course set up a cron job to run the script every five minutes, or run the script manually every time after tweeting, but neither of those is instant — and that’s exactly what I’m looking for. Is it p...

Automatic file transfer (daily)

Is it possible to automaticly download xml files from one server to another server on a daily basis with PHP? The goal is to create a webapplication in CakePHP which makes use of an xml report that comes from a online accountingserver. So it can be done using a cronjob? But is cron supported with PHP? Where can i configure that cronjo...

Automatic file transfer (daily)

Is it possible to automaticly download xml files from one server to another server on a daily basis with PHP? The goal is to create a webapplication in CakePHP which makes use of an xml report that comes from a online accountingserver. So it can be done using a cronjob? But is cron supported with PHP? Where can i configure that cronjo...

Monitor database table for external changes from within Rails application

I'm integrating some non-rails-model tables in my Rails application. Everything works out very nicely, the way I set up the model is: class Change < ActiveRecord::Base establish_connection(ActiveRecord::Base.configurations["otherdb_#{RAILS_ENV}"]) set_table_name "change" end This way I can use the Change model for all existing re...

Delayed_Job - on site5 server

I am currently using a site5 server and would like rake jobs:work pretty much running all the time. I currently cannot send out the jobs unless i'm logged into the server. I hope that someone out there can help me with this. Had alot of trouble with ar_mailer and the whenever gem ... but have about another 5 gems working perfectly withi...

Perl Cron Scheduler: start at x time, execute every y minutes forever

I'm using perl cron, and I want to make a rule like this run every xx min/hours starting at yy:yy time (until the end of time) How would I put this into a cron string? perl:cron seems to use the same syntax as regular cron so a regular cron string should work TIA! ...

rake task via cron problem loading rubygems

I have managed to get a cron job to run a rake task by doing the following: cd /home/myusername/approotlocation/ && /usr/bin/rake sendnewsletter RAILS_ENV=development i have checked with which ruby and which rake to make sure the paths are correct (from bash) the job looks like it wants to run as i get the following email from the cr...

Windows service that will run every hour.

I m able to build a windows service and install it. I m curious how can i run this service every hour ? I want it to run every hour periodically. I also need to know the hour range that it s running so that I can store it somewhere. How can i do that? Edit : This service will be installed on many machines, therefore, I dont want to c...

Automated Appointment Reminder

I need to create a web application using php, I had many users having appointments on different days and time. What I need is to send emails say 1 day, 6 hours and 1 hour before their respective appointments, cron job seems to be the option but how to run script at the specific times(when email has to be sent) for every user? ...

Missing Required Gems - javan-whenever and cron job in rails

Hi, I have finally managed to get javan-whenever gem working on my site5 server, and updating the crontab is quite easy, however whenever a cron job is run with the code that is generated, i get a "missing required gems" error where it lists about 8/10 of my gems. Has anyone else had this problem? If so, what would the solution be. T...

How to securely transfer

I have two servers -- a backend server, and a frontend server. Every night, the backend server generates static .html files, which are then compressed into .tar format. I need to write a script that resides on the backend server that will transfer the .tar file to the frontend server, and then decompress that .tar file into to the pu...

Running Cron Tasks on Heroku

I've seen that Heroku charges $15/mo to run Delayed Job, and $3/mo to run cron tasks daily. Is it possible to skip that entirely and run my own cron tasks manually? Or are they somehow figuring out that I'm running cron tasks? ...

PHP - Plesk - Cron - Allowed memory size exhausted?

ini_set('max_execution_time',0); ini_set('memory_limit','1000M'); These are the first two lines at the very top of my script. I was under the impression if I ran something via cron memory limits didn't apply, but I was wrong. Safe mode is off and when I test to see if these values are being set they are but I keep getting the good ol'...

Cron jobs and php script question

Hi, I have 5-6 jobs to be done by cron, and i have separated php scripts for those jobs. My question is, which one is better, putting all the jobs in one php script or keeping them in separated php files and entering them to crontab separately ? thx ...

Check if a php script is still running

I have a script that listens to a jabber server and responds accordingly. Though it's not supposed to stop, last night it did. Now I want to run a cron job every minute to check if the script is running, and start it if not. The question is, how do I check if a particular script is still running? Some solutions have been posted here, b...

Cron job and EasyPHP

Hi, I'm using EasyPHP (my OS = Windows XP) and I've wroten an little php-script that should update my database every hour while server is up. I could include the script into the index.php but then it would only be executed when there is activity on the site. How can I configure EasyPHP or Cygwin to execute my cron job ? thx ...