cron

ejb timer service vs cron

Hi Ejb timer service can start some process in desired time intervals. Also we can do the same thing with cron (min 1 minute) interval. But doing it with cron we have more power on controlling, monitoring and changing the intervals. Also we can restart if needed the cron very easily by command line. Also we can add or remove lines i...

Enable proper relative path in cron

I have 2 servers that are on completely separate OS' and configurations. One properly accepts require_once '../file.php'; and the other doesn't, because it's relative to where the cron is loading I guess. How can I fix the 2nd location so that it's relative path is from the relative path of the file. I need this to work in 3 different...

RoR: Using CRON and Actionmailer to send daily email updates to all users

What exactly would be the best way to go about using a cron task to send daily e-mails of updates to all users on my network? The e-mail would be made up of different information from multiple models. I want to do something like "1 new friend requests : name ..." from the request model and user model and "There are 3 upcoming events f...

Birt 2.5.2 report generates empty table data when run from a cron job

I've got a shell script that runs genReport.sh in order to create a .pdf formatted report, and it works perfectly when it's run from the command line. The data source for the report is a ClearQuest database. When it's run from a CRON job the .pdf file is created, except that only the various report and column headers are displayed, and...

'client_errors' warning in output from cron job that runs PHP on GoDaddy

Hi. I have several cron jobs that I've set up on my GoDaddy hosting account through their control panel. The commands look like this: /web/cgi-bin/php5 "$HOME/html/myfolder/cron_do_stuff.php" The jobs runs as scheduled, and the scripts work perfectly, and the output from the scripts always gets sent to my email address. I would lov...

PHP error_log() not writing to disk in cron job

When running PHP scripts as cron jobs, the error handler works but the error_log() function doesn't write to disk. I included these lines in the script run through cron in case it was because the php.ini values weren't getting picked up, but still no output to the error log. ini_set('display_startup_errors', 0); ini_set('display_errors...

phpMyAdmin Cron to Delete Temporary Files

I have a folder on my hosting which I periodically upload something to - /public_html/uploads - and I'd like to set up a cronjob through phpMyAdmin to empty it out on a regular basis. The current cron I have in pMA is find /public_html/uploads -maxdepth 1 -ctime 1 -exec rm -f {} \; (Ignore the fact that it's running every minute for...

Zsh command substitution

I usually work with BASH, but I'm trying to setup a cronjob from a machine and user account that is configured with zsh. When the cronjob runs, the date variable does not contain the date, just the string for the command to return the date. DATE=$(date +%Y%m%d) 55 15 * * 1-5 scp user@host:/path/to/some/file/$DATE.log /tmp I've tri...

Automatic backup

I need to backup automatically daily my database in mysql and all image files on the server. Is there a way to backup these things and send it on my email address ? ...

Making a cron(job) on XAMPP for Mac OS X

Hello, how do I create a cron / cronjob (I am not quite sure about the correct terminology ^^ ) on XAMPP for Mac OS X running Snow Leopard? Or how do I make a cron(job) on Snow Leopard, whether XAMPP or not? ...

Date sensitive redirect

I found a similar question unanswered here but I wanted to throw it out there again to see if anyone has any solution for this. I have a site that needs to display a different home page depending on the date and time. I know this could be done manually by manipulating the .htaccess at appropriate times but because of a myriad of logist...

how to send multiple commands to a file in cron??

I have a file that is having some multiple dynamic parameters.I want to send these parameters at the time of writing a file in main cron file. Something like this -> */15 * * * * /usr/bin/php /a/b/c.php parameter1 parameter2 parameter3 parameter4 Now i tried working this up but my file is not executing. What im concerned about is that...

GAE uploading to database - or - how to create big dictionary in GAE?

Hi, I have a GAE application. A new request is to have a huge database to store many items for some functionality. The database needs to populated every week or so - and populating it is done by querying many external links which overall takes around 1-2 hours. So, doing it via GAE Cron is now out of the question. Another option I was...

Right way to have a thread in parallel to django project on wsgi.

Hi guys. I'm writing a django project, and I need to have a parallel thread which performs certain tasks. The project will be deployed in Apache2.2 with mod_wsgi. Actually my implementation consists on a thread with a while True - Sleep which is called from my django.wsgi file. Is this implementation correct? Two problems raises: do...

How to schedule a cron job to backup a MySql database every week?

What is a command line I can use to back up a MySql database every single week into a file name with the date (so that it doesn't collide with previous backups)? Also, is this a reasonable backup strategy? My database is relatively small (a complete export is only 3.2 megs right now). The churn rate is relatively low. I need to be ab...

Running CodeIgniter cron on localhost

I'm trying to get a cron job to run every 5 min on my localhost. Using the Cronnix app I entered the following command 0,5 * * * * root curl http://localhost:8888/site/ > /dev/null The script runs fine when I visit http://localhost:8888/site/ in my browser. I've read some stuff about getting CI to run on Cron, using wget and various ...

[PHP] Dynamic cron jobs?

I'm writing a script that needs to be called at a random time during the day, but am not sure how to accomplish this. I don't want to waste server resources to run a cron job every minute. I want the script to be called at random, so generating the random times for say a month in advance and then creating cron jobs for each of them is...

What's the most auditable way to organize database maintenance scripting/scheduling?

I'm using PHP, Oracle and crontab. Crontab is invoking a php script, which is going to synchronize some data between a local and remote database. First I thought about putting this all in one large, anonymous inline PL/SQL block and executing it in PHP. The problem is that without creating a table to audit the procedure it's really op...

On iPhone, how do I check once per day to see if i should phone-home?

I want to check a file on the server only once each day (NSURL). And, no matter if I fetch the file or not, I do not run the function (to check for the file) again that day. This would SEEM easy... but I forsee issues. Say I had created a directory under the mainBundle: "/Library/runOnceEachDay/". Perhaps I could write to /Library/ru...

Scheduling with gearman vs. cron?

Hi everybody, I have noticed a lot of people discussing Gearman and it's scheduling features making it enable to distribute work onto other servers. However, I have not yet seen a comparison to native cronjobs. What are the differences between cron and Gearman? ...