Scheduling Actions with NodeJS

Intro

The Schedule options allow you to create actions that run at scheduled times. The scheduled actions run without the need of your page to be loaded in your browser. This is useful if you want to run daily or hourly tasks. In our example we will show you how to clear the contents of a folder every day.

NOTE: you need to enable the Experimental Features in Wappler settings to be able to use these options.
This option is only available for NodeJS projects.

Scheduled Actions

Creating a Scheduled Action

First, right click Schedule in Server Connect panel:

And add a Scheduled Action:

Add a name for you scheduled action:

Adding Steps to the Scheduled Action

Then we need to add the steps which should be executed. Right click steps:

Under File Management we select Empty Folder:

Select the folder which contents you want to clear:

Browse to the folder and click Select:

Set up Schedule

Now, after we’ve set up the steps to be executed, we need to setup the schedule for this action.
Click Schedule:

The default Schedule Settings are set to Every 15 minutes. We’d like to set a different period - every day. Open the period menu:

And select Daily:

Select the interval - we set this to every 1 day. You can change this according to your needs:

And then we set the time, when the action should be executed every day:

Click Save an you are done:

Now our folder will be emptied every day at 17:45.

Community Page
Last updated: