crontab_string+=tab.schedule+" { "+tab.command+" } 2> "+tmp_log+"; if test -f "+tmp_log+"; then date >> "+log_file+"; cat "+tmp_log+" >> "+log_file+"; rm "+tmp_log+"; fi \n";
// hook is in beta
if(tab.hook){
lettmp_hook="/tmp/"+tab._id+".hook";
crontab_string+=tab.schedule+" ({ "+tab.command+" } | tee "+tmp_hook+") 3>&1 1>&2 2>&3 | tee "+tmp_log+"; if test -f "+tmp_log+"; then date >> "+log_file+"; cat "+tmp_log+" >> "+log_file+"; rm "+tmp_log+"; fi; if test -f "+tmp_hook+"; then "+tab.hook+" < "+tmp_hook+"; rm "+tmp_hook+"; fi \n";
}else{
crontab_string+=tab.schedule+" { "+tab.command+" } 2> "+tmp_log+"; if test -f "+tmp_log+"; then date >> "+log_file+"; cat "+tmp_log+" >> "+log_file+"; rm "+tmp_log+"; fi \n";