#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    *.nix
    Posts
    2
    Rep Power
    0

    Suse cron task help


    hello friends,

    need a noob-proof step-by-step manual on this task:
    scheduled sh script which takes files via network from SSRV01 /root/Dektop/SOMEFOLDER to /MYPC/root/Desktop/SOMEFOLDERBCKPD

    which will create a HOSTNAME (SSRV01) based filename i was told that a variable should be declared for this but have no clue how to do this and the script should append the LOG of its activity not replacing with a timestamp on scheduled bacse for example every 3 hours via cron.

    please help
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    *.nix
    Posts
    2
    Rep Power
    0
    anybody?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,448
    Rep Power
    1751
    A quick man crontab will, hopefully, show you how to define the job in cron to run every three hours. For the actual script, creating the target filename would be like:

    Code:
    tgt=/MYPC/root/Desktop/SOMEFOLDERBCKPD/$(hostname)_the_file
    And you'd then use $tgt to refer to the target file name.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo