Author Topic: Is it possible to get 'anacron' behavior in TC  (Read 2332 times)

Offline samedirection

  • Jr. Member
  • **
  • Posts: 64
Is it possible to get 'anacron' behavior in TC
« on: June 29, 2009, 01:53:49 PM »
It looks to me like TC has a good old-fashioned crond, the kind that will launch your 'resmash my repository of belly lint' every day at 12:01, if you tell it to.  This is just the thing for always-on machines. 

But what if you want the anacron behavior:  "Resmash my lint repository every day,  even if I don't turn on my computer until evening."  Is there a way to get that in Tinycore? 

My particular case is that I'd like to have my personal git repository garbage collected every month ('git gc'), but it seems that if I just use a regular cron job, I might very easily miss my appointment, by say, not having my computer on just then.  Then I'd miss my monthly garbage collection, perhaps for months on end....  Or does cron 'do the right thing' anyway?   Thanks.

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Is it possible to get 'anacron' behavior in TC
« Reply #1 on: June 29, 2009, 02:25:51 PM »
The crond in the base package is provided by busybox. This version does not provide anacron-like features. The only way to get it done would be to port anacron to a .tce/.tcz. If you've already done some compiling of packages on any Linux system, it wouldn't be very hard. The biggest challenge is to create a /usr/local/tce.installed/anacron script that integrates anacron within the crond.

If you've got no experience in compiling such a package yourself drop me a personal message, and I'll try to hack the extension up on the weekend.

Offline samedirection

  • Jr. Member
  • **
  • Posts: 64
Re: Is it possible to get 'anacron' behavior in TC
« Reply #2 on: July 01, 2009, 06:20:33 AM »
Thanks for the reply.  I'll have a crack at compiling 'anacron' myself, but I'd be very glad of help with the integration script.  I thought about it for a few days, and my first thought was that I can do without anacron in this case (just set 'cron' to do my repository garbage collection a few different times a month.  It'll actually happen once every few months at least, which is enough), but there are a few housekeeping things I think anacron would be useful for, and I think it would be a good addition to Tinycore, so I'll push forward and let you know how I get on.