Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Schedule Job to patch server and running scripts

    Posted on

    Hello everyone

    I am working on a migration from Satellite 5.8 to Satellite 6.8 and I have two doubts on how can I schedule two different (but, in a way, similar) jobs via Hammer CLI.

    First case:
    I have a script to read a CSV file the servers to patch (we patch servers every day) with the following format:
    hostname;host_id;hour;patchdate

    For example:
    host1;1234567890;01:30;15-03-2021
    host2...
    host3...
    [...]

    And I need to create a job on every server, to execute a script that is locally on every client server at the hour and date provided on the file.
    I plan to do this using "hammer job-invocation create" is that possible?
    I mean that, on every server there is already a SCRIPT and I need to create a job to "say" to every server to execute that script at hour/date provided.
    So I plan to do a "while" loop to read the file and do the "hammer job-invocation create". Is this the right thing to do? Could you help me how can I use the hammer command in this case? with the proper parameters...

    Second case:
    I also have a script (this time is NOT on every client, just in Satellite server) and I need to send/execute this script on a servers listed in csv file. Is there an easy/simple way to do this? Is it possible to use any hammer command to perform this action? Any tips?

    Thanks in advance!

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat