examples/jobs.lua
changeset 33 db5396037b43
parent 29 0199ecce6c11
child 34 8206d7cb1447
equal deleted inserted replaced
32:524fde5be49a 33:db5396037b43
     1 --- JOBS
     1 --- JOBS
     2 
     2 
     3 delayed_jobs = {}
     3 delayed_jobs = {}
     4 
     4 
     5 -- may fail
     5 -- may fail
     6 dopath 'saved_jobs.lua'
     6 dofile ( main.fileoption 'lua_jobs_file' )
     7 
     7 
     8 function save_jobs ()
     8 function save_jobs ()
     9 	local h = io.open ( main.option ( 'lua_jobs_file' ), "w" )
     9 	local h = io.open ( main.fileoption 'lua_jobs_file', "w" )
    10 	if not h then
    10 	if not h then
    11 		print ( 'Cannot open jobs file for writing!' )
    11 		print ( 'Cannot open jobs file for writing!' )
    12 		return
    12 		return
    13 	end
    13 	end
    14 	h:write ( "-- This is autogenerated file, do not edit it manually\n\ndelayed_jobs = {\n" );
    14 	h:write ( "-- This is autogenerated file, do not edit it manually\n\ndelayed_jobs = {\n" );