I wrote backup app and want create snap for it and it is supposed to run this app form time to time (not permanently).
I googled over 2h and I am confusing… I find out:
- snap package is mounted read only in user system
- snapcraft.yaml define how to build snap
- meta/snap.yaml in side package configure snap at runtime
I also find out here that meta/snap.yaml file can be configured (I don’t know how) to run snap app at specific time:
# The service is activated by a timer, app must be a daemon. See timer # documentation for examples. # (snapd 2.33+) timer:
Fortunatelly I have snapd v2.38 . So I think I can eventually use this feature.
I see 2 problems:
- How can I change meta/snap.yaml ? I ask because it is not clear to me whether is this file automatically generated or not.
- I need to allow users define they own scheduler (they should decide when they want to make backup). But when snap package is read only mounted (especially meta/snap.yaml file), then: How can I define scheduler from my app (it is supposed to run my app with command line options in order to define backup parameters).