cron

Updating crontab from a makefile

Hi there! I'm trying to update the crontab from a GNU Make file. The idea is like this: I look through the existing cron table and filter out all entries marked as mine (via the comment) and save that to a temporary file. Then I add my jobs to that temporary file and make it a new cron table. That way the make file can be run several ti...

Anything wrong with using PHP as a server side language?

Is it wrong to use PHP as a server side language? For functions such as mail notifications / fraud checks (look for data, flag, then email type approach) / db cleanup / upload folder cleanup / cronjob type functions etc; I've ran into some projects lately where I've been successful with this approach, but I'm not sure if its the wrong w...

Looking For Best Practices On Building Feed Reader / Aggregator on a Cron

I have a social networking site which is beginning to gain some momentum and has an expanding user-base. We currently allow the users to import their blog, flickr and twitter feeds. We use the php library simplepie to read the feeds and then we check the DB to make sure we do not have a duplicate entry for each found feed item. If the fe...

AppEngine: scheduled tasks per Application or per Application Instance?

From what I gather, AppEngine fires up "Application Instances" (for a lack of better terminology that I know of) as a function of demand on the said application. Now, let's say I define Scheduled Tasks for my Application, is it possible that the said tasks might end-up being run by multiple Application Instances? The reason I am aski...

How to create Cron job to backup MySQL and FTP backup to my backup server?

I want to setup a cron job to run so that it will automatically backup my MySQL database, while the database is running, and then FTP that backup to my backup server. I assume I can do this using a bash script. Anyone know of a good way to accomplish this? Thanks in advance. ...

How to run an X program from outside the X session (e.g. from the console or SSH)

Without being the person logged in at the console, how do I run an X application and have it display on that X session? Assume I am either root, or I am the same user who logged in, so in principle I have persmission to do this. But how do I convince X of this? Some examples of situations like this: Log in with SSH and run a program t...

PHP: Send Email via cronjob and set amount of email send per mins

Hi guy i have a program which use to send group emails, i set a cornjob per mins for this program, and set execute per 2nd/min, and check if the now time is match to my defined schedule time in db. if true the program will run and send email, else nth... the problem is i want to dynamic set the amount of email sending per mins by use...

PHP CRON job, not output HTTP headers

Hi All - I have a PHP script that is called via a cron job, with the results sent to my email address: "php /path/to/cron.php" I only echo errors, otherwise nothing is outputted by me. This way I can get an error report when things go wrong. The problem is, I receive an email with ever cron execution, that only has the HTTP headers...

How to set php cron job?

I am using windows server 2003. I set a cron job, open IE explorer and run cron.php file. Basically, what the cron.php does is just send email to my own email address. I set it run every 2 minutes and run for 2 hours. I start the cron services, and I received the first email, but after that, I waited few hours, I am still didn't receiv...

bash : Make job every x days

I have a bash script runned every day via cron. In this bash I want to run some command but only every x day (x is fixed and will be 3, 4 or 5 I don't know at the moment) I can test if the remainder of the division day of month / x equal 0 day_of_month % x = 0 I will work on a single month but not always between to month, for example...

Django custom command and cron

I want my custom made Django command to be executed every minute. However it seems like python /path/to/project/myapp/manage.py mycommand doesn't seem to work while at the directory python manage.py mycommand works perfectly. How can I achieve this ? I use /etc/crontab with: ****** root python /path/to/project/myapp/manage.py mycommand...

Python problem executing popen in cron

I use popen to execute commands in a Python script, and I call it via cron. Cron calls out this script but the behavior isn't the same if I call it by hand. Source: from subprocess import Popen, PIPE pp = Popen('/usr/bin/which iptables', shell=True, stdout=PIPE) data = '' for ln in pp.stdout: data = data+ln if data == '': pr...

How do YOU deploy cron jobs to production?

How do people deploy/version control cronjobs to production? I'm more curious about conventions/standards people use than any particular solution, but I happen to be using git for revision control, and the cronjob is running a python/django script. ...

Creating crontab via Capistrano instead of using crontab -e

I would like to include cron tasks in my Capistrano deployment files instead of using the following command to manually edit the crontab file: crontab -e [username] Is there a script I could use within the Capistrano run command to set the contents of the crontab? ...

problem scheduling cron job at hostmonster

hello, I am trying to setup cron jobs for a website hosted at hostmonster.com. At the time of configuring timestamp when I use * * * * * the script runs perfectly. but whenever I made changes to these timstamps the script doesnot work say if I use 30 18 * * * script doesnot execute. This automated script insert data in the data...

php plugin or library to let users set cron ?

i am making a CMS, I need a premade solution that lets users set time for CRON ? it'd be nice if stuff like ajax calendar was also included. ...

What are the differences between running an executable straight from the command line and from a cron job in Linux?

I have this executable that queries a remote server for a command, executes it on the local machine and returns the stdout (and also possibly stderr) from it back to the server. This executable runs just fine if called from the command line (as root), but I found it's failing for some commands when executed automatically by the cron job...

Problems importing large xml feeds (LAMP)

Hi Wonder if anyone can help me out with a little cron issue i am experience The problem is that the load can spike up to 5, and the CPU usage can jump to 40%, on a dual core 'Xeon L5410 @ 2.33GHz' with 356Mb RAM, and I'm not sure where I should be tweaking the code and which way to prevent that. code sample below //Note $productFi...

Regular delayed jobs

Hello, I'm using Delayed Job to manage background work. However I have some tasks that need to be executed at regular interval. Every hour, every day or every week for example. For now, when I execute the task, I create a new one to be executed in one day/week/month. However I don't really like it. If for any reason, the task isn't co...

cron info sent a weird email

Hi I got this email from cron info of my server. "`client_errors' has different size in shared object, consider re-linking" what is this ? this cron job is just a simple email script this is the script include("../admin/connect.php"); require("../class.phpmailer.php"); $from = "[email protected]"; $fromname = "Me"; $mail = new PHPM...