Automatic FTP programs between different systems, CRONTAB's writing, source code summary.

zhaozj2021-02-16  71

Summary after a project, write it out to give yourself a summary, I hope to give someone a little convenient to others. 1. The script of the file is automatically transmitted between different systems. 2. Under AIX, execute the Java program, the SH script, and the writing of crontabs. Automatic FTP is a relatively practical feature, in many systems need, in your own project, explore for a while, now write out in different systems, give yourself a summary. 1. Procedure from AIX to another AIX, FTP data: ceertftp.sh #begin ceertftp.sh file ......................................... FTP for app2, app1 to web1, ........ # Use for the customer and provide the download for bank ..... # NEED Be Do Every 30 minus what can game. ............... Export user = ftpusr1 export pass = hahah export hostclient1 = 10.1.1.1 export file02 = / usr / WebSphere / appserver / installedapps / csjapplication.ear / Basicapp.war / SHUIY / UPLOAD / 02 / EXPORT STRDEST02 = / USR / HTTPSERVER / HTDOCS / CERT / 02 / EXPORT STRDEST = / usr / httpserver / htdocs / ceert / # begin to ftp from app2 to Web1 ......... .. ftp -n $ hostclient1 <

User $ user $ pass Prompt Off CD $ STRDEST02 LCD $ file02 binary mput *. * Bye! EOF! CP /USR/websphere/appserver/installedapps/csjapplication.ear/basicapp.war/shuiy/upload/02/*.* / usr / WebSphere / AppServer / installedApps / CSJApplication.ear / BasicApp.war / shuiy / upload / bak / 02 / rm /usr/WebSphere/AppServer/installedApps/CSJApplication.ear/BasicApp.war/shuiy/upload/02/*. * #End ceertftp.sh file ......................... crontab -e Add a line of data, as follows: 33 * * * *. ~ /. Profile; CD /USR/websphere/appserver/installedapps/csjapplication.ear/basicapp.war/shuiy/shfile ;/certftp.sh Run once every hour of 33 minutes. 2. Run on WindowNS, download data from AIX, then remove data from AIX: two files: ftpfromapp1.txt, addtoplan.bat. 1) ftpFromapp1.txt content. # Begin ftpFromApp1.txt file .. open 10.1.2.1 ftpusr1 xiajun04 cd /usr/WebSphere/AppServer/installedApps/CSJApplication.ear/BasicApp.war/shuiy/zipfiles/ lcd D: / Job / payment notifications automatically run / zip binary prompt Mget *. * mdelete *. * Bye # end ftpfromapp1.txt file .. 2) The file content of addtoplan.bat. #Begin addtoplan.bat file ... ftp -s: ftpfromapp1.txt #end addttoplan.bat file ... Then add AddTOPLAN.BAT to the planned task, you can save the data to the machine on Windows. 3. Send the specified file name (the beginning of the 310 starting) on ​​Windows to the specified server. Two files, addtoplan.bat, ftpupload.txt 1) ftpupload.txt. # Begin ftpupload.txt file .. Open 78.20.32.40 MQM Sczjsczj CD / Home / MQM / FJ_USER / FILES LCD C: / NSRData Prompt MPUT 310 *. * Bye # end ftpupload.txt file .. 2) Addtoplan.bat. # Begin addtoplan.bat file. Ftp -s: ftpupload.txt CD C: / NSRData Echo y | Copy 310 * .txt C: / NSRDATA / BAK Echo Y | DEL 310 * .txt #end addttoplan.bat file. Put Addtoplan.bat is available in the planned task. 4. Theunal execution program is scheduled to write the path to the Java program to the ClassPath.

转载请注明原文地址:https://www.9cbs.com/read-15272.html

New Post(0)