# Scheduling logstash pipeline from postgresql to elasticsearch. ERROR: /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/cronline.rb:77: warning: constant ::Fixnum is deprecated

**URL:** <https://discuss.elastic.co/t/scheduling-logstash-pipeline-from-postgresql-to-elasticsearch-error-usr-share-logstash-vendor-bundle-jruby-2-5-0-gems-rufus-scheduler-3-0-9-lib-rufus-scheduler-cronline-rb-warning-constant-fixnum-is-deprecated/186878>\
**Category:** Logstash\
**Created:** [June 21, 2019, 12:38pm UTC](https://discuss.elastic.co/t/scheduling-logstash-pipeline-from-postgresql-to-elasticsearch-error-usr-share-logstash-vendor-bundle-jruby-2-5-0-gems-rufus-scheduler-3-0-9-lib-rufus-scheduler-cronline-rb-warning-constant-fixnum-is-deprecated/186878 "2019-06-21T12:38:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MARCO\_RAMBALDI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_rambaldi/32/46108_2.png) [@MARCO\_RAMBALDI](https://discuss.elastic.co/u/MARCO_RAMBALDI)\
**Post date:** [June 21, 2019, 12:38pm UTC](https://discuss.elastic.co/t/scheduling-logstash-pipeline-from-postgresql-to-elasticsearch-error-usr-share-logstash-vendor-bundle-jruby-2-5-0-gems-rufus-scheduler-3-0-9-lib-rufus-scheduler-cronline-rb-warning-constant-fixnum-is-deprecated/186878/1 "2019-06-21T12:38:51Z")

</div>

Hi,  
I'm trying to keep postsgresql synchronized with elasticsearch using logstash.  
To do this, I tried to insert the scheduling parameter into the input configuration pipeline:

# file.conf

input {  
jdbc {  
# Postgres jdbc connection string to our database, mydb  
jdbc\_connection\_string =\> "jdbc:postgresql://localhost:5432/my\_db"  
# The user we wish to execute our statement as  
jdbc\_user =\> "myuser"  
# The path to our downloaded jdbc driver  
jdbc\_driver\_library =\> "/etc/logstash/postgresql-42.2.5.jar"  
# The name of the driver class for Postgresql  
jdbc\_driver\_class =\> "org.postgresql.Driver"  
#password marambal  
jdbc\_password =\> "mypassword"  
# our query  
statement =\> "SELECT document::text,updated\_at from snapshots"  
schedule =\> " 0 7 \* \* \* "  
use\_column\_value =\> true  
tracking\_column =\> "updated\_at"  
}  
}

filter{  
json{  
source =\> "document"  
#target =\> "json\_doc"  
remove\_field =\> ["document"]  
}  
}

output {  
stdout { codec =\> json\_lines }  
elasticsearch {  
#codec =\> json  
index =\> "snapshots"  
#document\_type =\> ""  
document\_id =\> "%{updated\_at}"  
hosts =\> ["localhost"]  
}  
}

The moment I start logstash with this command:

// sudo bin/logstash -f /etc/logstash/conf.d/big-data.conf --path.settings /etc/logstash/

the following output comes out:

[2019-06-21T13:54:38,756][INFO][logstash.javapipeline] Pipeline started {"pipeline.id"=\>"main"}  
[2019-06-21T13:54:38,998][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
[2019-06-21T13:54:40,108][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/cronline.rb:77: warning: constant ::Fixnum is deprecated

and remains pending...it doesn't work.  
I expect logstash to upload new data to elasticsearch every day at 7 AM, isn't it?

---

<div class="post-metadata">

**Author:** ![shaka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaka/32/50219_2.png) [@shaka](https://discuss.elastic.co/u/shaka)\
**Post date:** [July 16, 2019, 7:08am UTC](https://discuss.elastic.co/t/scheduling-logstash-pipeline-from-postgresql-to-elasticsearch-error-usr-share-logstash-vendor-bundle-jruby-2-5-0-gems-rufus-scheduler-3-0-9-lib-rufus-scheduler-cronline-rb-warning-constant-fixnum-is-deprecated/186878/2 "2019-07-16T07:08:29Z")

</div>

Have same trouble  
You need to add timezone  
"0 7 \* \* \* America/Chicago"

> **[jmettraux/rufus-scheduler](https://github.com/jmettraux/rufus-scheduler#a-note-about-timezones)**
>
> scheduler for Ruby (at, in, cron and every jobs). Contribute to jmettraux/rufus-scheduler development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 13, 2019, 7:08am UTC](https://discuss.elastic.co/t/scheduling-logstash-pipeline-from-postgresql-to-elasticsearch-error-usr-share-logstash-vendor-bundle-jruby-2-5-0-gems-rufus-scheduler-3-0-9-lib-rufus-scheduler-cronline-rb-warning-constant-fixnum-is-deprecated/186878/3 "2019-08-13T07:08:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
