game/addons/game_base/data/story_cron.xml

19 lines
981 B
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- 定时把 novel/ 下的 Markdown 增量同步进数据库。
间隔 5 分钟:改完 md 无需手动跑命令,网站数分钟内自动更新;
Odoo 重启后调度器恢复,也会按时触发(即"重启带着一块更新")。
Odoo 18 的 ir.cron 改为委托 ir.actions.servercode 状态)执行,
故用 model_id + state="code" + code 的方式,旧的 model/function/args/numbercall 字段已废弃。 -->
<record id="ir_cron_sync_novel" model="ir.cron">
<field name="name">宇森·小说 Markdown 同步</field>
<field name="model_id" ref="game_base.model_game_story_volume"/>
<field name="state">code</field>
<field name="code">model.action_sync_novel()</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="active" eval="True"/>
<field name="user_id" ref="base.user_root"/>
</record>
</odoo>