cron - custom - marker - /var/log/cron - bash script - centos

51 Views Asked by At
  1. Every day I run the script in which I run the rsync script several times.
  2. The output from rsync goes to the log in /var/log/cron

How to add in the script (which is automatically run), so that in addition to the result from rsync, there is additional information about which rsync is first, second, etc. e.g.

  1. rsync1
  • the result (this is already there)
  1. rsync2
  • the result (this is already there)

etc.

1

There are 1 best solutions below

0
ibad125 On
  1. first make script like "/home/rsync.sh"
#!/bin/bash
# Run script rsync1, rsync2
    
# execute script rsync1 ( if you have script ) 
./home/rsync1
    
# execute script rsync2 ( if you have script ) 
./home/rsync2
  1. and register as a cronjob
0 0 0 0 0    ./home/rsync

here is reference may you can be helped https://askubuntu.com/questions/923260/cron-run-a-script-after-the-other