Run function at a specific time of a day

The problem was in scheduled cron jobs. While testing I had previously set cron job for the same hook. After inspecting cron jobs I managed to delete that test schedule and now it is working.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)