-
oracle 脚本内容
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion alias ic="ibmcloud" export PATH=/root/bin:$PATH [[ -e "/root/lib/oracle-cli/lib/python2.7/site-packages/oci_cli/bin/oci_autocomplete.sh" ]] && source "/root/lib/oracle-cli/lib/python2.7/site-packages/oci_cli/bin/oci_autocomplete.sh" oci compute instance launch --availability-domain XeYe:AP-TOKYO-1-AD-1 --display-name ruyo --image-id ocid1.image.oc1.ap-tokyo-1.aaaaaaaau4wlvvida2gedfvz7cvvqhentwrcibnlwceinslag4bbe3zehuzq --subnet-id ocid1.subnet.oc1.ap-tokyo-1.aaaaaaaarur4bw7t5tctk3zyug6pqaenwdpjrrfx6z7uytrondfrkuqmidaq --shape VM.Standard.E2.1.Micro --assign-public-ip true --metadata '{"ssh_authorized_keys": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAo1JkF2ADfAjepkupk45b37QPjpNAeUrhn32qk0tCPMShVT1if5ollL5HANFFw9EQ4vIiujjyznDE84ysO0yHnBm8TW0pwfbbPsMOgqDNSc7o78EwHSKQgl/SYObpv6P+7gOxw8WzbU7EvVsFa6WzkNYtWvguNZwEHXg5H68U6YrarKEFWxxJXwbTgn7QQrxn7KDkqJhpKSJ2Pi4zNrNlu9xVUzbnUOflaJk17UaXGArguo9Q8w68CJpWAkmcTt/816vvNdcZ80uD/UFZ5t0SX1810+cosJ4B3lJeKr0SRp6IpzTq8TSRjPlPZQZqkNCQfNcoN2qe8ueBubTRXLY/Ew== rsa 2048-091919"}' --compartment-id ocid1.tenancy.oc1..aaaaaaaaoz7w6meqev67bw6hdzj6dfyvgvm6qfpvjc52jwf4y2dbzepchbda
crontab -e
添加以下定时任务
*/1 * * * * /bin/bash /root/oracle.sh >> /var/log/aa.log 2>&1 &