Archive

Posts Tagged ‘crontab’

Wget From Crontab

October 21st, 2009 Comments off

I need to place a wget on my crontab to get files from another server

Php/mysql Script For Crontab

July 13th, 2009 Comments off

**********************************************************************
!+++ this is an adult website +++! – you must be 18 or older and agree to work on an adult content website.
- no gay content, basically you be looking at adult dvd box covers.
**********************************************************************

I have a ‘products’ table in mysql that contains a memo field that contains list of actors in comma separated value format.

e.g:
John Smith, John Doe, Hank Johnson, Jason, Frank Thomas, etc

What I need is a script that I can run via shell/crontab that will make make a list of all the individual actors and dump them into a new table.

Basically ‘table1′ contains thousands of movies with the actors in that movie in a memo field in CSV format. I need the script create a list of all the actors in every movie within the table, remove any duplicates within that list, then create/add the list of actors to a new table; ‘table2′. Once the script runs again via crontab, it should compare all of the actors in table1 with table2 and add any new actors it finds. that’s it

This is what the script should do exactly:

1) do a query within that table/column and find all of the actors and break them up individually – (the comma determines a new value).

2) remove all of the duplicates it finds.

3) dumps the new actors list into a new table, since there will be multiple movies with the same actor, we only want the actors to show up once in the new table.

4) the script must be able to run via crontab/shell

5) once the script reruns via crontab, it must look at table1 and table2 and add any new actors it finds, if it doesn’t find any new actors.. it doesn’t add anymore to the list in table2.

Basically what I’m trying to do is create an index listing page for all the available actors that are on the site

Bear