Workflow to map waterbars in road and create recurrent maintence task?

I am mapping waterbars in the road with the FieldKit app, generating logs with geolocation for each of them. Those waterbars need maintance twice an year.

I woud like to convert those logs to assets. Can I do this thorugh the interface, maybe exporting and reimporting? Or does this need to be done programatically? (I am already testing the python api, wich seems wonderful). It would be nice to show those as cluster maps. A second step would be for me to create a geometry associated to those assets created from logs. What would be a workflow for this?

Another question is if there is a recommended way to create recurrent to do task, like a cronjob, so when the time comes, the to do logs are generated so that they can be marked as done after those waterbars are inspected.

2 Likes

I think I was not keeping it simple (stupid)…

I can just export a kml file from a list of logs and them create an asset and import it…

I keep my question about the cronjob-like way of creating recurrent tasks (maybe python api + real cornjob?).

1 Like

That’s a neat use case! Ideally it would be possible to create assets directly from Field Kit… I think there would be other similar use cases for creating assets on the fly. Hopefully one day!

Re: a cronjob-like way, one thing we have discussed in the past is the Drupal Rules module. It would be neat if we could define rules for all sorts of different things. Check out the comments on this post: Schedule a log based on a quantity value

1 Like

@rafaeltcc we’ve also talked about the idea of making it possible to create “Plans” that auto-generate recurring tasks. Here is the request/discussion for reference: https://www.drupal.org/project/farm/issues/2962368

But certainly a cron job + python script would work too!

But certainly a cron job + python script would work too!

Just to further this thought a bit… Drupal provides a hook_cron() that can be used to run PHP code on a regular basis within a Drupal module. So if you are experimenting with custom farmOS modules at all that could be useful. Here is the documentation for that in api.drupal.org: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_cron/7.x

Of course, the prerequisite to that is setting up your normal system cron to run Drupal’s cron. Setup instructions for that are here: https://www.drupal.org/docs/7/setting-up-cron