Skip to main content

Schedule a cron job to run at a specific time

More
10 years 5 months ago #236997 by deuce4884
-- HikaShop version -- : 2.5.1
-- Joomla version -- : 3.5.0
-- PHP version -- : 5.3.24

I'm looking to create a plugin that uses the cron trigger to call a function once a month. I'm wanting to call the function on the first day of the month at 9:00 AM. Is there a way I can set the cron trigger to do this?

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #237001 by nicolas
Hi,

Well, if you configure your cron task to be called every hour, the onHikashopCronTrigger function of your plugin will be called every hour.
It's then up to the plugin itself to check whether to do something or not.
So in that function, you shoudl check the day and the hour and then run your custom code only when necessary.

Please Log in or Create an account to join the conversation.

Time to create page: 0.166 seconds
Powered by Kunena Forum