You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How can I automatically kill long running jobs ?

Step-by-step guide

  1. One way of doing this is a combination of the late flag and triggers. This shows an example with/without a script. This example show both, hence you need to choose one.
suite s 
      task long_running                   # if task takes takes longer than 2 hours set late flag
           late -c +02:00                 
      task kill_long_running              # only triggered if task long_running is late
          trigger long_running<flag>late   
      task kill_long_running_noScript     # only triggered if task long_running is late
          trigger long_running<flag>late  
          edit ECF_NO_SCRIPT 1 
          edit ECF_JOB_CMD "export ECF_PASS=%ECF_PASS%;export ECF_PORT=%ECF_PORT%;export ECF_HOST=%ECF_HOST%;export ECF_NAME=%ECF_NAME%;export ECF_TRYNO=%ECF_TRYNO%; ecflow_client --init=$$; %ECF_CLIENT% --kill /s/long_running; %ECF_CLIENT% --complete"

            2.The script for kill_ long_running task

kill_long_running.ecf
<head.h>
ecflow_client --kill /s/long_running
<tail.h>

There is no content with the specified labels



  • No labels