How to Cron Jobs in Siteworx

Cronjobs are scheduled tasks which runs a script/program at a specified time. Siteworx enables you to manage the cronjobs through a graphical interface.

To manage the cronjobs Navigate to Hosting features >> Cronjobs

You will see two sections, one “cron options” and second “cron editor”, cron options lets you edit certain parameters which are used while running the cronjobs, while cron editor lets you create/edit/delete cronjobs.

Click on “Edit” button under “cron options” section, this opens up a small window with configurable options. First option that you see is a “SHELL” this is the operating system shell that will be used while executing the crons. You can choose /bin/bash, if your program/script requires other shell then you can choose that from the dropdown menu. 

Second option is PATH, this is the directory path that will be searched to execute the program/script that you specify in your cronjob. You can input multiple directories here, each on one line.

Third option is MAILTO:, here you can specify an email address where an email notification will be sent after the cronjob is run and the output will be included in that email.

Once you have chosen/input desired values you can click on “Update”, the options will be saved. You can edit this options anytime by clicking on “Edit”

Now we want to add a cronjob. For this click on the button titled “Simple Interface”. This lets a novice user add cronjob with just a few clicks. The “Advanced Interface” is meant for more advanced users. 

Clicking the “Simple Interface” opens up a window, Here you can choose the Minute, Hour, Day, Month & Day of week that you want your cronjob to run on.

Minute option lets you choose minutes between 0-59, You can choose multiple minutes by pressing Ctrl key and clicking on desired minutes. it also lets you choose if you want to run the cronjob every 2, 5,10 or 15 minutes.

Similarly Hour option lets you choose hours between 00:00 to 23:00, You can select multiple hours by pressing Ctrl key and clicking/selecting desired hours. it also lets you choose if you want to run the cronjob every 2, 4 or 6 hours.

Day option lets you choose the day between 1 to 31, You can select multiple days by pressing Ctrl key and clicking/choosing the days. You can also choose to run the cronjob on all days by choosing “All” option.

Month option lets you choose the months between Jan to Dec, You can select multiple months by pressing Ctrl key and clicking/choosing the months desired. You can also choose to run the cronjob in all months.

Finally “day of the week” option lets you choose the days on which you wish to run the cronjob. You can select multiple days by pressing Ctrl key and clicking/choosing the days of the week. You can choose to run the cronjob on all days by selecting “All” option. 

Script option is where you specify the script/program name along with the parameters or arguments to pass on to your script.

Once you have selected and have input desired parameters, you can click on “Add” button. This will add the cronjob and make it active. The cronjob will get listed in Cron Editor section, and you can edit/delete the cronjob any time.

  • 12 Users Found This Useful
Was this answer helpful?

Related Articles

New to Siteworx? Please Read.

Overview You may have some experience dealing with other hosting companies and may have an idea...

SiteWorx Server Paths

Following paths for SiteWorx Servers: Root path to html directory:...

Where do I upload my webapp files?

It depends on your service, if you have shared JSP or Java web hosting. When you ftp or SSH in,...

Adding a new user to Siteworx's control panel for administration

Once you login to your Siteworx, Go to the Administration menu on the left, there, click on...

Logging in

To access your SiteWorx account, you can connect via the following ways....