Lounge Network - Knowledge Base

  View Printer Friendly Version Search
[CRON JOBS] How do I add a cron job?
The following instructions apply only to our Corporate and Business Class Hosting Plans:

Step 1: In your web browser, go to www.controlpanel.co.nz.

Figure 1

Step 2: Enter your Lounge Network Hosting Control Panel User Name and Password into the appropriate text fields, then click Logon.

Figure 2

Step 3: From the left side of the page, click Cron Jobs under the Services tab. If Cron Jobs is not visible, click the Services tab to expand it.

Figure 3

Step 4: All the cron jobs currently in your account are listed on the right side of the page. To add a new cron job, click the Add A Cron Job link at the top of the page.

Figure 4

Step 5: In the Add Cron Job dialogue, enter the script to run. Be sure to enter its full path. Please refer to your 'Account Information Email' that we initially emailed you when the account was setup to find out this is. It should be similar to the following :

Step 6: In the Add Cron Job dialogue, specify the time(s) the script will run by selecting options from the Hour, Minute, Day of Month, Month and Day of Week columns, shown in figure 5.

Note that selecting multiple options in the same column means the script runs more often (for example, selecting 0, 4 and 9 in the Minute column means the script will execute in minute 0, 4 and 9 of each hour). Selecting multiple options across different columns means the script will run less often (for example, selecting only 2 in the hour column means the script will run at 2AM every day, but selecting 5 in the Day of Month column as well will make the script execute only on the 5th of the month at 2AM).

Step 7: In the Add Cron Job dialogue, select the user that will run the script (shown in figure 5). This can be any PHP/Standard user that your account has.

Step 8: In the Add Cron Job dialogue, enter an email address to send any output from the script to, otherwise output will be discarded.

Click Add to add the cron job.

Figure 5

Step 6: The script will execute the next time its specified time occurs. When you have finished adding cron jobs you can log out of the Control Panel by clicking the logout button (shown in figure 6) in the top right corner of the screen.

Figure 6

How can I execute PHP scripts via cron?

When you are creating or editing a cron job in the control panel, enter the script to execute line in the form:

/usr/local/bin/php /home/loungenetwork/clients/yourusername/yourdomain.co.nz/script.php

The script will be executing by PHP version 5. If your script needs to be run in PHP version 4 your script line will need to be in the form:

/usr/local/bin/php4 /home/loungenetwork/clients/yourusername/yourdomain.co.nz/script.php

Make sure you use the full path for any files you include. Please note that PHP 4 is being phased out due to it development and support ending. Therefore you should upgrade your scripts to work on the PHP 5 servers now.

How do I execute website url via cron ?

lynx -dump "http://..." > filename


lynx -dump "http://..." > /dev/null

How can I execute ASP scripts via cron?

ASP scripts can not be directly executed by cron, but you can set up a cron job to request the ASP script, thus executing it.

To do this, enter a cron job in the form:

lynx --dump http://www.domain.nz/script.asp


Knowledgebase Manager

© Copyright Lounge Network 2001-2018