How to make sure WP-CRON job loops through all posts?

You’re not specifying the number of posts you want back from the query, so it defaults to whatever you have set under Settings > Reading.

If you want all that match your criteria, then add 'posts_per_page' => -1 to your query arguments.

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