# 本地定时任务模块



```sql
set @id = 2000;
set @pid = '1';
set @icon = 'time';

-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component,query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values(@id, '定时任务', @pid, '1', 'cron', 'system/cron/index', '{\"group\":0}', 1, 0, 'C', '0', '0', 'sys:cron:page', @icon, 'admin', sysdate(), '', null, '定时任务');

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values(@id+1, '定时任务查询', @id, '1',  '#', '', 1, 0, 'F', '0', '0', 'sys:cron:query',        '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values(@id+2, '定时任务新增', @id, '2',  '#', '', 1, 0, 'F', '0', '0', 'sys:cron:add',          '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values(@id+3, '定时任务修改', @id, '3',  '#', '', 1, 0, 'F', '0', '0', 'sys:cron:update',         '#', 'admin', sysdate(), '', null, '');

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values(@id+4, '定时任务删除', @id, '4',  '#', '', 1, 0, 'F', '0', '0', 'sys:cron:remove',       '#', 'admin', sysdate(), '', null, '');

```

