I must arrange a cron to alter function of a person at a selected time. For instance- At 8 PM on a regular basis, the function of a selected person needs to be modified from “Buyer” to “Editor”
Learn how to accomplish this in wordpress?
UPDATE:
I’ve scheduled the perform as follows but it surely’s not working on the time set:
if( !wp_next_scheduled( 'import_into_db' ) ) {
wp_schedule_event( strtotime('12:04:00'), 'day by day', 'import_into_db' );
perform import_into_db(){
$u = new WP_User(3);
$u->set_role('editor');
}
add_action('wp', 'import_into_db');
}
The features is working nice independently (with out scheduling) however does not run when scheduled. Cron is working nice on my set up and time is ready as per UTC. What’s fallacious within the scheduling a part of my code?