I spent 9 hours yesterday writing my first BASH script. While BASH isn't the hardest to understand, it's a little confusing for someone who has more of a VB background than C. The script basically takes and variable value (number of times to run) and performs an sql script that many times. The SQL script pulls 1 record from a table that has a flag set to N, updates various other tables and then inserts a record into another table and updates the flag on the original table to Y.
If you are wondering what this is for, it's to resend some information into a long term archive. The host system believes these records were already archived, so this is to trick the system into re archiving those exams.
The system can handle about 100 new entries into the queue every 15 mins, so I have a crontab entry to run the script once every 15 mins, placing 100 entries into the queue.
With 175k entries to be re archived, I estimate around 18.5 days to complete the migration.
I'd post the script here, but unfortunately it contains proprietary info in it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment