I am working on a website which has around 150k users.
I have to create a csv file which contains the details of user (drupal fields and profile2 fields ) and export the csv to another server daily.
I have implemented by export function in a hook_cron and in the function i do a user_load function call and two profile2_load_by_user and some other custom mysql queries.
The problem which i have is that my export_function does not seem to terminate, it may be a timeout or a memory problem.
I have tested my function my limiting the number of users to around 1000 and it works fine.
I am wondering whether it is possible to export huge volume of data through hook_cron.