If I run
sudo crontab -e
I can edit the crontab, but it's read-only so nothing gets saved.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You're right, you can't edit the crontab in Snappy Ubuntu Core. Personally I just create a service that sleeps. For instance, say there was an operation you wanted to run every 15 minutes. Put it in a shell script named
#!/bin/sh while true; do do_my_thing sleep 15m done
Make it executable. Now create something like the following
name: foo version: 1 summary: My snap description: My snap apps: my-service: command: my_service.sh daemon: simple parts: foo: plugin: copy files: my_service.sh: bin/
If you install the resulting snap you'll have that service with
do_my_thing running every 15 minutes. If your timing requirements are more complicated (e.g. run every Sunday at 0200) you can still pull this off, but it of course gets a bit more complex.