How can I write a trigger that fires everyday at night 9’o clock?




 Actually I'm developing a project I want to write a trigger that should fire every day at night 9'o clock and that trigger should copy data from one table to another table.
A trigger is not what you want.


What you need is a scheduled job.


Take a look at the official documentation on the subject:


[Scheduling Jobs with Oracle Scheduler](http://docs.oracle.com/cd/B28359_01/server.111/b28310/scheduse.htm#i1033533)


Feel free to ask more questions if you find any trouble when creating your scheduled job.
> 
> i want to create ap application which generates popup alerts at the day of event ocurs as well as a day before the event will occur in a specific time interval as well.. events are stored in database and they are all date fields .. so i want to link those fields to create popups .. help me .
> 
> 
> 


In order to help you, you must first provide us with what you have achieved. We do not write code for you, simply correct and enlighten on mistakes. Hi Pauline,


Assuming you are using DSS version 9, you can use "Time-based" trigger and set "Repeat every" to 1 month and see if any condition will meet your requirements in the "Run on" dropdown. Please note: depending on the day selected, you may have some additional "Run on" dropdown option. Like in my example below, I chose the last Friday of the month, and that option appeared in the dropdown.


![Screenshot 2021-04-09 at 09.07.36.png](https://community.dataiku.com/t5/image/serverpage/image-id/3140i8598A7FDC3C76323/image-size/large?v=v2&px=999 "Screenshot 2021-04-09 at 09.07.36.png")


Regarding your question to set up a trigger to run on the last business day of the month, there is no option available at the moment. However, you can utilise custom trigger and python code for such custom requirements. Please check an example I have created below:  
Screenshot:


![Screenshot 2021-04-09 at 11.02.52.png](https://community.dataiku.com/t5/image/serverpage/image-id/3141i5F287B33BFD93DF1/image-size/large?v=v2&px=999 "Screenshot 2021-04-09 at 11.02.52.png")


Code:


 



```
import pandas as pd
from datetime import datetime
#get today's date in YYYY-MM-DD format
todaystr = datetime.today().strftime("%Y-%m-%d")
s = pd.date_range(todaystr, periods=1, freq='BM')
df = pd.DataFrame(s, columns=['Date'])
#get last working day of the current month from created dataframe above
lastBDCMstr = df.iloc[0]['Date'].strftime("%Y-%m-%d")
if lastBDCMstr == todaystr:
    from dataiku.scenario import Trigger
    t = Trigger()
    t.fire()
```

 


  
Above I utilised pandas, but for sure, there are many other ways to do it.


I hope this helps.


Best,  
Vitaliy




[View solution in original post](/t5/Using-Dataiku-DSS/Scenario-run-Last-Business-date-of-the-month/m-p/15612#M6566) how about this?

fn write\_some\_content(&mut self, hour: u32) -> result<(), std::io::error> {

if self.current\_hour != hour {

if let some(writer) = self.current\_file.as\_mut() {

writer.flush()?;

}

self.current\_file = none;

self.current\_hour = hour;

}

… Please see: [How do I schedule a task to update indexes?](https://qa.mythicsoft.com/14733/how-do-i-schedule-a-task-to-update-indexes?show=14733#q14733) hey, so after some minor improvements i finally found the time to make this into a doc that everyone can use, adopt and copy. let me know what you think and if you have any improvements.

[image]

[life dashboard - the all in one tracker](https://coda.io/@heuschkelsimon/life-dashboard-all-in-one-tracker)

track your personal habits, finances, tasks and time … Put this in a batch file and call as desired.



```
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set fdate=%%a%%b%%c
for /f "tokens=1,2,3,4,5 delims=: " %%a in ('time /t') do set ftime=%%a%%b%%c%%d%%e
exp userid=DEBASIS/DEBASIS@DEBASIS_DB file=C:\BACKUP\backup%fdate%%ftime%.dmp log=C:\BACKUP\backup%fdate%%ftime%.log
``` hello stacey! thank you for stopping by the disney parks moms panel! i hope you are having a magical week. weather permitting, each night there are fireworks at disneyland park. i would check about 7-10 days prior to your visit to see the posted times of the fireworks but it’s generally the same time each week so you can look at next week’s schedule to get an idea to help plan. i hope this helps and please let me know if you need anything else as you plan your visit! see you real soon! -emily you might be able to use synchronize. if you have more than 2 tables, you will need to use it multiple times. hey [@andre601](/u/andre601) ! i think there is a webhook that fires for that:

<https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request>

check out the action key in the payload, it has support for state changes between draft and non-draft states. clock - in the same app, you can set alarms, see what hour is and count down. a simple and useful app that always is welcomed. alarm sound can be personalized.