How to periodically run a task within emacs?

前端 未结 2 782
甜味超标
甜味超标 2020-12-14 06:28

Is there a way to periodically run an elisp function in a long-running emacs, similar to cron, but within the emacs process?

For example I want to \"automatically ru

相关标签:
2条回答
  • 2020-12-14 07:27

    Check out run-with-timer.

    (run-with-timer 0 (* 30 60) 'recentf-save-list)
    
    0 讨论(0)
  • 2020-12-14 07:35

    You might also find midnight mode useful. One can arbitrarily define 'midnight' and then add hooks as desired.

    0 讨论(0)
提交回复
热议问题