Sha256: e7fd61d03f4dd005f5ec2df1871d9d204ba1bcc369fd9c6f0a9b0591a8f2ec8f

Contents?: true

Size: 1019 Bytes

Versions: 10

Compression:

Stored size: 1019 Bytes

Contents

#+TITLE:           Linked tasks example
#+runmode:         tasks
#+final_task:      final

The goal here is to be able to define dependencies
among blocks and run the correctly in that order.

With ~:after first~, the ~second~ block becomes
a prerequisite of the ~first~ block.

#+name: second
#+begin_src sh :after first
for i in `seq 5 10`; do 
  echo $i >> out.log
done
#+end_src

#+name: first
#+begin_src ruby
5.times { |n| File.open("out.log", "a") {|f| f.puts n } }
#+end_src

Using ~:after all~ is special, since it means that the task
depends on everything else having run already.

#+name: final
#+begin_src python :after second :results output
print "Wrapping up with Python in the end"
f = open('out.log', 'a')
f.write('11')
f.close()
#+end_src

The same with ~:before all~, this would be executed
at the beginning.

#+name: prologue
#+begin_src sh :before first :results output
echo "init" > out.log
#+end_src

Note: Both ~:before all~ and ~:after all~ get accumulated
and are run sequentially after that.

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
org-converge-0.0.17 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.16 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.15 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.14 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.13 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.12 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.11 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.9 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.8 spec/converge_examples/linked_tasks/tasks.org
org-converge-0.0.7 spec/converge_examples/linked_tasks/tasks.org