Title: Crons not working
Last modified: August 19, 2016

---

# Crons not working

 *  [rajasekharan](https://wordpress.org/support/users/rajasekharan/)
 * (@rajasekharan)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/crons-not-working/)
 * Hi,
 * I am trying to get wordpress to call a function called “wpr_cronjob” every hour
   in my plugin. So I registered a activation hook and in the book I call the following
   function:
 * wp_schedule_event(time(), ‘hourly’, ‘wpr_cronjob’);
 * The function is not getting called because every time the function is called,
   I will receive an email (which I am not). I have set up a cronjob on my linux
   server to run wp-cron.php every 5 minutes and the function is still not getting
   called. Could you please tell me what I am doing wrong?
 * Thanks in advacne,
 * Raj

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [blam4c](https://wordpress.org/support/users/blam4c/)
 * (@blam4c)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/crons-not-working/#post-1182090)
 * I have the same problem here, both with a plugin that I have written myself and
   another plugin. If I schedule posts, that works great. Just “plugin crons” don’t
   seem to be called at all.
 * Is there any way I can find out why?
 * Is there a CRON Log?
 *  [lordcoste](https://wordpress.org/support/users/lordcoste/)
 * (@lordcoste)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/crons-not-working/#post-1182109)
 * I have the same problem in one of my plugin :/
 *  Thread Starter [rajasekharan](https://wordpress.org/support/users/rajasekharan/)
 * (@rajasekharan)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/crons-not-working/#post-1182117)
 * I email the mailing list and then found out the solution as follows:
 * First add the function to be called to a action
 * add_action(‘some_action’,’my_function’);
 * some_action can be replaced with any random name for an action you can think 
   of.
 * Then schedule the action:
 * wp_schedule_event(time(), ‘hourly’, ‘some_action’);
 * The key is to schedule actions not functions.
 *  Thread Starter [rajasekharan](https://wordpress.org/support/users/rajasekharan/)
 * (@rajasekharan)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/crons-not-working/#post-1182118)
 * Further more the [core-control plugin](http://wordpress.org/extend/plugins/core-control/)
   can be used to see the currently scheduled crons.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Crons not working’ is closed to new replies.

## Tags

 * [cron](https://wordpress.org/support/topic-tag/cron/)

 * 4 replies
 * 3 participants
 * Last reply from: [rajasekharan](https://wordpress.org/support/users/rajasekharan/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/crons-not-working/#post-1182118)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
