[Nix-dev] Packaging a tool that registers in crontab

Damien Cassou damien.cassou at gmail.com
Sun Aug 31 20:16:21 CEST 2014


Hi,

I'm packaging backintime, a backup tool that registers itself in the
crontab of the user. The tool can have several profiles : a profile is
a set of files to backup, a backup destination and a period at which
to backup. The tool registers in the crontab one line per profile. For
example :

$ crontab -l
[...]
0 * * * * /nix/store/.../nice -n 19 /run/current-system/sw/bin/ionice
-c2 -n7 /nix/store/...backintime-common-1.0.36/bin/backintime
--backup-job >/dev/null 2>&1

*/30 * * * * /nix/store/.../nice -n 19
/run/current-system/sw/bin/ionice -c2 -n7
/nix/store/...backintime-common-1.0.36/bin/backintime --profile-id 2
--backup-job >/dev/null 2>&1

Here we can see that the tool registered two profiles in two lines of
the crontab. That does not work on nixos, it looks like cron never
looks at the user's crontab.

I'm looking for a solution to package this tool for both nixos and
non-nixos nix-based distributions.

Thank you

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


More information about the nix-dev mailing list