# this is a python task: python do_printdate () { import datetime # goes to cooker shell: bb.warn('py: --> S: %s <--' % (d.getVar("S", True))) bb.plain('py: Date: %s' % (datetime.date.today())) # goes to log: print(datetime.datetime.now()) print(datetime.date.today()) # goes to cooker shell: bb.plain("py: Check the logs!") bb.plain('py: this log file: %s/log.do_printdate' % (d.getVar("T", True))) } addtask do_printdate after do_compile before do_install # this is a shell task: do_s () { bbwarn "shell: --> S: ${S} <--" } addtask do_s before do_printdate