def set_special(user, special, cmd):
 lst = list_tab(user)
 for cron in lst['special']:
  if ((special == cron['spec']) and (cmd == cron['cmd'])):
   return 'present'
 spec = {'spec': special, 'cmd': cmd}
 lst['special'].append(spec)
 comdat = _write_cron_lines(user, _render_tab(lst))
 if comdat['retcode']:
  return comdat['stderr']
 return 'new'

def set_special ( user , special , cmd ) : lst = list_tab ( user ) for cron in lst [ 'special' ] : if ( ( special == cron [ 'spec' ] ) and ( cmd == cron [ 'cmd' ] ) ) : return 'present' spec = { 'spec' : special , 'cmd' : cmd } lst [ 'special' ] . append ( spec ) comdat = _write_cron_lines ( user , _render_tab ( lst ) ) if comdat [ 'retcode' ] : return comdat [ 'stderr' ] return 'new'
set up a special command in the crontab .