Cron task firing but function not working

Figured it out…

I needed to use $post->ID instead of get_the_ID().

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