step1:
creating new shell file script , and all commands to run in it
cat copy.sh
step2: editing the shell file to run the commands and add #!/bin/sh in first line
vi copy.sh
#!/bin/sh
cp <file from location to other location>
:wq!
step3 scheduling every 2 min and every 8 hours:
crowntab -e
*/2 * * * * <path of file to run eg: /tmp/copy.sh>
* */8 * * * <path of file to run eg: /tmp/copy.sh>
:wq!
creating new shell file script , and all commands to run in it
cat copy.sh
step2: editing the shell file to run the commands and add #!/bin/sh in first line
vi copy.sh
#!/bin/sh
cp <file from location to other location>
:wq!
step3 scheduling every 2 min and every 8 hours:
crowntab -e
*/2 * * * * <path of file to run eg: /tmp/copy.sh>
* */8 * * * <path of file to run eg: /tmp/copy.sh>
:wq!
No comments:
Post a Comment