cron

Relative path not working in cron PHP script

If a PHP script is run as a cron script, the includes often fail if relative paths are used. For example, if you have require_once('foo.php'); the file foo.php will be found when run on the command line, but not when run from a cron script. A typical workaround for this is to first chdir to the working directory, or use absolute path...

cronned "cp *.html" is omitting new files on OSX

I have a cronned "cp *.html" command that runs every minute on an OSX box. The source files are regenerated from a database and written to the source directory just fine. The cp command usually picks them up and refreshes the copies in /Library/WebServer/Documents (this is for a quick-and-dirty internal website that monitors one of our...

How to improve my Algorithm to find the Hot-Topics like twitter does.

I have created a cron job for my website which runs every 2hours and it counts the words in the feeds, and then displays the 10 highest count words as the hot topics. Some thing what twitter does on there homepage, to show the most popular topics that are being discussed. What my cron job does right now is it counts the words except ...

Cannot get PHP cron script to run

I have a PHP script that I need to run every minute. I have made sure that the script works from the command line, and I'm using absolute paths to avoid any environment issues: /usr/bin/php -q /var/www/myapp/services/myservice.php Manually running that as root from the command line works fine, as I can see from the log file that my sc...

Set cronjob/scheduled task in windows server 2003? Php & Mysql

I would like to set a scheduled task/cron job to update database. I planning updating the database using a php script, i.e connect to database and execute SELECT and UPDATE query. I already prepared the php script, and what should I do next? I am (my server) is using Windows Server 2003, IIS, php and mysql. When I google this, I got t...

cron syntax for date

The following statement work at command prompt. But does not work in a cron. myvar=`date +'%d%m'`; echo $myvar >> append.txt The cron log shows that only a part of the date statement is run. How do I use it in a cron? ...

cron jobs under mac os 10.6 snow leopard

I'm trying to set up an automated svn commit to run semi-hourly under mac os 10.6, but the crontabs i'm adding to cron don't seem to be valid and/or don't seem to even be looked at by cron. For testing i made a simple crontab and script: Crontab: */2 * * * * /Users/username/crontest where username is replaced with my system username...

Autmatically create table on MySQL server based on date?

Is there an equivalent to cron for MySQL? I have a PHP script that queries a table based on the month and year, like: SELECT * FROM data_2010_1 What I have been doing until now is, every time the script executes it does a query for the table, and if it exists, does the work, if it doesn't it creates the table. I was wondering if I c...

How can I run a shell script from inside a Perl script run by cron?

Is it possible to run Perl script (vas.pl) with shell sript inside (date.sh & backlog.sh) in cron or vice versa? Thanks. 0 19 * * * /opt/perl/bin/perl /reports/daily/scripts/vas_rpt/vasCIO.pl 2> /reports/daily/scripts/vas_rpt/vasCIO.err Error encountered: date.sh: not found backlog.sh: not found Perl script: #!/opt/perl/bin/per...

Oracle scheduled tasks?

I'm drawing a design for a system to do daily business functions for my company. It will consist of a Oracle 10g database with Pl/SQL packages and a Java-based web application. All of this is running on a Solaris 10 server. Aside from handling transactions from the web interface, scheduled tasks need to run on the database to run calc...

TV guide written in PHP - problems with datetime() and database functions

I'm creating a TV Guide which lists programmes coming up (and on some listings, previous airings from the past), with all data stored in a database. It runs in PHP, my version being 5.28 (upgrading to 5.30 or 6 soon). Below is a script which works (note the field airdate is stored as DATETIME in the database): [Disclaimer: The script ...

Auto escalation of a trouble ticket in vtiger CRM

Iam customizing vtiger CRM. There are following users in the system based on the heirarchy: Technician - Territory Manager - Area Sales manager - MD Trouble ticket is created by Technician is assigned to Territory manager. Territory manager has 30 min to respond to the same. If he fails to, it automatically escalates to Area Sales Man...

Install a cron job with a php script

I'm developing a web application that requires the use of Cron. I'd like to make it easy to setup with an auto install process like Wordpress. I have no problems writing the install script up en till its time to set up Cron. Please tell me if I can do this. ...

Is it possible to run a cron job in a web application?

In a java web application (servlets/spring mvc), using tomcat, is it possible to run a cron job type service? e.g. every 15 minutes, purge the log database. Can you do this in a way that is container independent, or it has to be run using tomcat or some other container? Please specify if the method is guaranteed to run at a specific t...

Badge achievement system like SO: Data being used + Criteria(instant awarding & cron jobs)

I've been looking at an open source clone of SO, http://github.com/cnprog/CNPROG I don't know Python/Django but I can still read whats going on, The developers, seem to only be awarding badges with cron jobs, The awards are given out by the methods, being the "Rules" of the Criteria that must be met to achieve the award. in this file...

Cron command to run php script every 10 minute

Hello . in my hosting i have a section for cron job like this: the php script is called "croned.php" , which i want it to run every 10 minutes what i will fill in every field? i tried but it didn't work Note: the full path to the script is : /home/axelzd/domains/hellodom.com/public_html/croned.php Thanks ...

script runs fine when run from command line but not via cron

i have a php script which runs fine when executed by SSHing into my server and running it. however the php script doesn't seem to run even though a cron job set to run it every 10 minutes. How do I view errors produced by cron job ? ...

possible to indicate absolute path in ruby's require ?

i discovered a problem when cron tries to run a ruby script which uses some library. require "library" #do some stuff it complains about not being able to find library.rb so i was wondering if i could do something like require "/var/dir/library.rb" ...

How to create MySQL back up executable file?

I am using php, mysql and my server is Windows Server 2003 with IIS6. I am planning to backup my database on hourly basis. I can do the cronjob, tested by write date&time into a log file. It works perfectly. Now I want to use the cronjob to backup my databases. How do I do that? Create a php script and let it run every hour?? ...

what does the -q flag in cron jobs do?

I have a cron job on my host: /ramdisk/bin/php5 -q /home2/sharingi/public_html/scrape/copyV2.php That is just plain not running. The 'support' is telling me that -q is quiet mode and that is why I am not receiving any output emails of any kind... However all my other cron jobs have been and are running with -q and have been sending me...