I'm looking for a library in Python which will provide at and cron like functionality.
I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.
For those unfamiliar with cron: you can schedule tasks based upon an expression like:
0 2 * * 7 /usr/bin/run-ba...
I've got a PHP script on a shared webhost that selects from ~300 'feeds' the 40 that haven't been updated in the last half hour, makes a cURL request and then delivers it to the user.
SELECT * FROM table WHERE latest_scan < NOW() - INTERVAL 30 MINUTE ORDER BY latest_scan ASC LIMIT 0, 40;
// Make cURL request and process it
I want to b...
Hello all,
I have this command that I run everyday via cron:
find /home/get/public_html/videos -daystart -maxdepth 0
-mtime +1 -type f -name "*.flv" |xargs rm -f
The problem is that it doesn't delete the .flv files in a directory that are 1 or more days old.
How can I correct the above command?
EDIT: Paul - the command "ls -l /ho...
Say a client is happy with the work you've done creating a script to accomplish a task that gathers some information and outputs a hefty database file. Then, they're interested in having the task run periodically (approximately monthly) without human intervention. The client is not interested in running the task locally, so you're forced...
I wrote a script in Ruby. I'd like to run it every day at a certain time. How do you do that on a Windows XP system?
I poked around on the machine and discovered the "scheduled tasks" control panel, but it doesn't seem to have anything to do with running scripts, as far as I can tell from the options offered by the "wizard".
...
How to easily and simply, schedule a cron job in PHP -- Rails has BackgroundRB.. Thanks for your help!
...
My web page uploads a file. Currently it places that file in a directory which is polled by a cron job. If the file is there, a bash script acts on the file. I hate the fact that I am polling. The upload happens perhaps once a week, but the user wants to see results within minutes from their file, so I end up polling every 5 minutes....
Hello all,
I have a web application that currently sends emails. At the time my web applications sends emails (sending of emails is based on user actions - not automatic), it has to run other processes like zipping up files.
I am trying to make my application "future proof" - so when there are a large number of users I don't want the ...
I know that I can have something run every five minutes in cron with a line like:
*/5 * * * * /my/script
What if I don't want it running at 12:00, 12:05, 12:10, but rather at 12:01, 12:06, 12:11, etc? I guess I can do this:
1,6,11,16,21,26,31,36,41,46,51,56 * * * * /my/script
...but that's ugly. Is there a more elegant way to do ...
Is there anything like lint for crontab? I'd like to know that i've got all my spaces and stars sorted out without waiting for something to not work.
...
Having the same problems as this post, except I don't think the solution is the same unfortunately.
I'm getting this error message:
Rails requires RubyGems >= 0.9.4. Please install RubyGems
when I run a script/runner job in Cron, but it works perfectly fine when I run it in a terminal on the same server.
The rails server also runs f...
Because ZF depends on mod rewrite for all it's URLs, it's not immediately apparent to me where I should store local scripts for use with a cron job.
Does anyone have any recommendations, or is there an "officially accepted" way?
...
Hi,
I have some functions that use curl to pull information off a couple of sites and insert them into my database. I was just wondering what is the best way to go about executing this task every 24 hours?
I am running off windows now, but will probably switch to linux once I am live (if that makes a difference). I am working inside sy...
Hello all.
I have a PHP/MySQL web site where I want to output the # of entries in a DB/table on the main page, but I don't want to make this query every time a user hits the home page. I want it to automatically run once a day and output the query results to a flat file which I can then just include. I figure that should reduce load...
Maybe theres another solution to this. I built a web app that requires 5-10 crons to keep it maintained and various intervals.
I want to check-in the crontab into version control, so that it can be easily deployed
to other servers.
I would like to be able to put a line in the /etc/crontab file
that would tell it to look into /myapp/app....
Hello all,
I have this command that I run every 24 hours currently.
find /var/www/html/audio -daystart
-maxdepth 1 -mtime +1 -type f -name "*.mp3" -exec rm -f {} \;
I would like to run it every 1 hour and delete files that are older than 1 hour. Is this correct:
find /var/www/html/audio -daystart
-maxdepth 1 -mtime +0.04 -type f -...
I'm working on a website for a client, in PHP/MySQL. They are a publisher, and the site needs to show whether the book you are looking at is in stock with their distributor.
The stock file is a CSV file on the distributor's FTP. This file is updated at a certain time every evening. So far I've written a script in PHP that copies the con...
I'm looking to add a crontab entry to execute a script every 30 minutes, on the hour and 30 minutes past the hour or something close. I have the following, but it doesn't seem to run on 0.
*/30 * * * *
What string do I need to use?
The cron is running on OSX.
...
I want to process a particular mailbox when it receives mail, I know I could have cron check every n minutes for any mail, but wondering if there's a way to "listen" for mail rather than continually polling.
...
If I run a script from /home/<user>/<dir>/script.sh, as root, the cron works pretty well. But If I run the script from /root/<dir>/script.sh (as root, again), the cron does not seem to work.
...