Iamlaosong
Because you want to modify the importer, you discover a benefit of using scripts in the Linux timed task instead of executable programs.
Linux server has a scheduled task, the downloaded data into the database, such tasks are usually started early in the morning. Because the data structure changes or optimization procedures, you need to modify the import program, and the import program because of the long execution time, the day is often in execution, can not be overwritten, can only be saved with another name, to the scheduled task the next day when the new program starts, you must modify the program name in the scheduled task.
If a script is used in a timed task and the importer is executed in the script, it is possible to modify the executable name in the script, because the script can be overwritten without affecting the original executed script and avoids the hassle of modifying the scheduled task. script qtimp.sh:
# #ftp get EMS data from Downcenter server 10.3.10.40# #eidt by Iamlaosong 20130205#datdir= ' date-d ' – 1 day ' +%y%m%d ' Cd/hom e/oracle/bin/sdptqt# the code of Provincesfor Pcode in 11 12 13 14 15 21 22 23 31 32 33 35 36 37 41 42 43 44 45 46 50 51 5 2 65dofname=03004_${pcode}_${datdir}.datecho ${fname}./sdpt_qt1 ${datdir} 03004 ${pcode}fname=03005_${p Code}_${datdir}.datecho ${fname}./sdpt_qt1 ${datdir} 03005 ${pcode}done
One of the SDPT_QT1 is the new program, the original is SDPT_QT.
After writing to think of this benefit is how insignificant, just a method, after all, modify the timing task is also very simple.
One of the benefits of using scripts instead of executable programs in Linux timed tasks