Schedule a script under yunohost

Hi Guys,

I have to schedule a script every hour but I would like to know if it’s a good idea to put it in the cron file (user cron file cron -e). Is, under yunohost, this file, erased each time a update is done ?

is there another way to make that under YN ?


YunoHost don’t erase the user cron file.

Other solutions:

  • put a cron file in /etc/cron.hourly or in /etc/cron.d/
  • use a systemd timer

If you want to backup/restore this change with yunohost you should create a backup/restore hook in /etc/yunohost/hooks.d/backup/99-mycron /etc/yunohost/hooks.d/restore/99-mycron


thanks all.

PS: it’s not a backup option, it’s tweet scheduled…

Yes I understand it’s not a backup you shedul, i just say that if you want to be able to restore automatically you tweet schedule, you need to add a backup/restore hook to manage it. Else ynh will not backup your tweet script.

1 Like