Creating the Cron Job

We’ve now created all the parts to our MLS system, but we often need one more finishing touch, a scheduled job to keep our listings up to date. To do so we first need to uncomment a couple lines in each batch file we created. Uncomment “UPDATE_BCF” and “UPDATE_ONLY” so it looks like the following:

RETS Batch Update

Now we have two options. You can create a cron job for each individual batch, or we can create a very simple shell script to kick them all off one after another. Then we only need to create one cron job to execute that shell script. Here’s what your shell script(or bat for Windows) should resemble(just create a file name

# execute this to update all feeds to database with cron job

cd /PathToVieleRETS/vieleRETS

php -q ./run_interactive_job.php batch_control_files/MyBatch
echo Updated MyBatch

php -q ./run_interactive_job.php batch_control_files/AnotherBatch
echo Updated AnotherBatch

Be sure to replace PathToVieleRETS and MyBatch respectively. Now our only cron job will be to execute this script: /pathToCronJob/ There you have it, a 6 step tutorial to completely handle all of your RETS MLS needs from retrieving the feed to creating a scheduled download!