Composr Supplementary: Setting Timed Content for Composr and Your Arvixe Webhosting
Written by Steve Jarvis, Sponsored by Arvixe hostingBeing able to set up timed content on your Composr website is possibly something you will want to do at some point during your website's lifespan. This might be so you can schedule content to go live while you are away, or in the case of a news site you may have an embargo on news until a specific time.
As Arvixe have kindly sponsored many of our tutorials, we will explain it directly for Arvixe hosting. Other cPanel-based hosting is the same, however.
The first task is you need to do is known as "setting up a cron job". To do this you will need to log in to your Arvixe webhosting cPanel.
Once you have logged into cPanel scroll down to the advanced section which is the second last section in the standard cPanel on Arvixe hosting. Click on the "Cron Jobs" option which will take you to a screen which will have a section which looks like this:
To set up the cron job you need to fill in all of the options. Depending on how regularly you will want to post scheduled content will determine what settings you use in this section. You can set cron to run as often as you like from once every minute to once a month. In most cases once every 5 minutes will be more than adequate. To set this you need to input */5 in the minute box which is every 5 minutes. If this was */7 it would run every 7 minutes. You also need to fill in the hour, day month and weekday options. As you want it to run every hour, every day, every month and every weekday you need to put "*" in each of these boxes.
If you want the cron to run very minute put "*" in all of the boxes or choose the every 1 minute option in the common settings.
The php is telling cron it is calling a php file and the second part is the path to the file within your hosting. You can find the first part by looking at the stats section of your cPanel home screen which will tell you your home directory. The next part public_html is where your root directory of your webhosting files will be and the data/cron_bridge.php is the path of the file within your hosting. If you have not installed your Composr website on the root of your hosting you will need to add the directory of the website into the command line too.
For example if your website is installed into a WEB directory then the command line would be:
Once you have filled this in you can click the "Add new Cron job" button.
This will now instruct Cron to call the file at the designated time. I have noticed this can sometimes take an hour or two to kick in so be patient.
Once this is up and running you should see options to schedule a post within the advanced section of when you add a new news post, for example. Once this appears you will know your Cron is running correctly. The option will look like this:
You will also need to make sure you have the website time settings correct otherwise the article may not appear at the correct time.
Please rate this tutorial:
Have a suggestion? Report an issue on the tracker.