├── .gitattributes
├── .gitignore
├── .paket
├── paket.bootstrapper.exe
└── paket.targets
├── .travis.yml
├── Cronix.All.sln
├── Cronix.Web.sln
├── Cronix.sln
├── Install.ps1
├── LICENSE.txt
├── README.md
├── RELEASE_NOTES.md
├── appveyor.yml
├── build.cmd
├── build.fsx
├── build.sh
├── docs
├── content
│ ├── cronix service installation.fsx
│ ├── developers guide.fsx
│ ├── index.fsx
│ ├── settingup WebUI.fsx
│ ├── startup script.fsx
│ └── the big picture.fsx
├── files
│ └── img
│ │ ├── logo-template.pdn
│ │ ├── logo.png
│ │ ├── overview.png
│ │ ├── overview.pptx
│ │ └── webui.PNG
├── samples
│ ├── BitstampTicker
│ │ ├── BitstampTicker.fsproj
│ │ ├── Exchange.fs
│ │ ├── Script.fsx
│ │ ├── SqlCreate.txt
│ │ ├── Types.fs
│ │ ├── app.config
│ │ └── paket.references
│ ├── CSharpSample.Jobs
│ │ ├── CSharpSample.Jobs.csproj
│ │ ├── ExternalJobs.cs
│ │ └── Properties
│ │ │ └── AssemblyInfo.cs
│ ├── CSharpSample
│ │ ├── App.config
│ │ ├── CSharpSample.csproj
│ │ ├── NLog.config
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Startup.fsx
│ │ └── paket.references
│ ├── CryptoTicker
│ │ ├── CryptoTicker.fsproj
│ │ ├── Exchange.fs
│ │ ├── SqlCreate.txt
│ │ └── paket.references
│ └── FSharpSample
│ │ ├── App.config
│ │ ├── AssemblyInfo.fs
│ │ ├── FSharpSample.fsproj
│ │ ├── NLog.config
│ │ ├── Program.fs
│ │ ├── Startup.fsx
│ │ └── paket.references
└── tools
│ ├── generate.fsx
│ └── templates
│ └── template.cshtml
├── paket.dependencies
├── paket.lock
├── src
├── Cronix.UI
│ ├── .bowerrc
│ ├── .gitignore
│ ├── Web.config
│ ├── bower.json
│ ├── gulpfile.js
│ ├── package.json
│ ├── readme.txt
│ ├── src
│ │ ├── app
│ │ │ ├── base.js
│ │ │ ├── bootstrap.js
│ │ │ ├── excanvas.min.js
│ │ │ ├── require.config.js
│ │ │ ├── router.js
│ │ │ └── startup.js
│ │ ├── components
│ │ │ ├── job-preview
│ │ │ │ ├── job-preview.html
│ │ │ │ └── job-preview.js
│ │ │ └── nav-bar
│ │ │ │ ├── nav-bar.html
│ │ │ │ └── nav-bar.js
│ │ ├── css
│ │ │ ├── base-admin-responsive.css
│ │ │ ├── bootstrap-responsive.min.css
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.min.css
│ │ │ ├── dashboard.css
│ │ │ ├── font-awesome-ie7.css
│ │ │ ├── font-awesome-ie7.min.css
│ │ │ ├── font-awesome.css
│ │ │ ├── font-awesome.min.css
│ │ │ ├── font
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.svgz
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ └── fontawesome-webfontd41d.eot
│ │ │ └── style.css
│ │ ├── img
│ │ │ ├── body-bg.png
│ │ │ ├── glyphicons-halflings-white.html
│ │ │ ├── glyphicons-halflings.html
│ │ │ ├── icons-sa7c41345d9.png
│ │ │ ├── message_avatar1.png
│ │ │ ├── message_avatar2.png
│ │ │ └── signin
│ │ │ │ ├── check.png
│ │ │ │ ├── fb_btn.png
│ │ │ │ ├── password.png
│ │ │ │ ├── twitter_btn.png
│ │ │ │ └── user.png
│ │ └── index.html
│ ├── test
│ │ ├── .bowerrc
│ │ ├── SpecRunner.browser.js
│ │ ├── bower.json
│ │ ├── components
│ │ │ └── home-page.js
│ │ ├── index.html
│ │ └── require.config.js
│ └── vwd.webinfo
├── Cronix.Web
│ ├── AssemblyInfo.fs
│ ├── Cronix.Web.fsproj
│ ├── Hubs.fs
│ ├── WebPlugin.fs
│ ├── Website.fs
│ ├── paket.references
│ └── paket.template
└── Cronix
│ ├── App.config
│ ├── AppSettingProvider.fs
│ ├── AppSettings.fs
│ ├── AssemblyInfo.fs
│ ├── BootStrapper.fs
│ ├── BootStrapper.fsi
│ ├── Compiler.fs
│ ├── Cronix.fsproj
│ ├── FSharp.Core.optdata
│ ├── FSharp.Core.sigdata
│ ├── Installer.fs
│ ├── Logging.fs
│ ├── Scheduling.fs
│ ├── Startup.fsx
│ ├── Triggers.fs
│ ├── Types.fs
│ ├── paket.references
│ └── paket.template
├── tests
└── Cronix.Tests
│ ├── App.config
│ ├── AppSettingsTests.fs
│ ├── Cronix.Tests.fsproj
│ ├── SchedulingTests.fs
│ ├── ServiceEnviroment.fs
│ ├── ServiceSystemTest.fs
│ ├── Startup.fsx
│ ├── TriggerEnviroment.fs
│ ├── TriggerTests.fs
│ └── paket.references
└── todo.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp text=auto eol=lf
6 | *.fs diff=csharp text=auto eol=lf
7 | *.fsi diff=csharp text=auto eol=lf
8 | *.fsx diff=csharp text=auto eol=lf
9 | *.sln text eol=crlf merge=union
10 | *.csproj merge=union
11 | *.vbproj merge=union
12 | *.fsproj merge=union
13 | *.dbproj merge=union
14 |
15 | # Standard to msysgit
16 | *.doc diff=astextplain
17 | *.DOC diff=astextplain
18 | *.docx diff=astextplain
19 | *.DOCX diff=astextplain
20 | *.dot diff=astextplain
21 | *.DOT diff=astextplain
22 | *.pdf diff=astextplain
23 | *.PDF diff=astextplain
24 | *.rtf diff=astextplain
25 | *.RTF diff=astextplain
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Xamarin Studio / monodevelop user-specific
10 | *.userprefs
11 |
12 | # Build results
13 |
14 | [Dd]ebug/
15 | [Rr]elease/
16 | x64/
17 | build/
18 | [Bb]in/
19 | [Oo]bj/
20 |
21 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
22 | !packages/*/build/
23 |
24 | # MSTest test Results
25 | [Tt]est[Rr]esult*/
26 | [Bb]uild[Ll]og.*
27 |
28 | *_i.c
29 | *_p.c
30 | *.ilk
31 | *.meta
32 | *.obj
33 | *.pch
34 | *.pdb
35 | *.pgc
36 | *.pgd
37 | *.rsp
38 | *.sbr
39 | *.tlb
40 | *.tli
41 | *.tlh
42 | *.tmp
43 | *.tmp_proj
44 | *.log
45 | *.vspscc
46 | *.vssscc
47 | .builds
48 | *.pidb
49 | *.log
50 | *.scc
51 |
52 | # Visual C++ cache files
53 | ipch/
54 | *.aps
55 | *.ncb
56 | *.opensdf
57 | *.sdf
58 | *.cachefile
59 |
60 | # Visual Studio profiler
61 | *.psess
62 | *.vsp
63 | *.vspx
64 |
65 | # Guidance Automation Toolkit
66 | *.gpState
67 |
68 | # ReSharper is a .NET coding add-in
69 | _ReSharper*/
70 | *.[Rr]e[Ss]harper
71 |
72 | # TeamCity is a build add-in
73 | _TeamCity*
74 |
75 | # DotCover is a Code Coverage Tool
76 | *.dotCover
77 |
78 | # NCrunch
79 | *.ncrunch*
80 | .*crunch*.local.xml
81 |
82 | # Installshield output folder
83 | [Ee]xpress/
84 |
85 | # DocProject is a documentation generator add-in
86 | DocProject/buildhelp/
87 | DocProject/Help/*.HxT
88 | DocProject/Help/*.HxC
89 | DocProject/Help/*.hhc
90 | DocProject/Help/*.hhk
91 | DocProject/Help/*.hhp
92 | DocProject/Help/Html2
93 | DocProject/Help/html
94 |
95 | # Click-Once directory
96 | publish/
97 |
98 | # Publish Web Output
99 | *.Publish.xml
100 |
101 | # Enable nuget.exe in the .nuget folder (though normally executables are not tracked)
102 | !.nuget/NuGet.exe
103 |
104 | # Windows Azure Build Output
105 | csx
106 | *.build.csdef
107 |
108 | # Windows Store app package directory
109 | AppPackages/
110 |
111 | # Others
112 | sql/
113 | *.Cache
114 | ClientBin/
115 | [Ss]tyle[Cc]op.*
116 | ~$*
117 | *~
118 | *.dbmdl
119 | *.[Pp]ublish.xml
120 | *.pfx
121 | *.publishsettings
122 |
123 | # RIA/Silverlight projects
124 | Generated_Code/
125 |
126 | # Backup & report files from converting an old project file to a newer
127 | # Visual Studio version. Backup files are not needed, because we have git ;-)
128 | _UpgradeReport_Files/
129 | Backup*/
130 | UpgradeLog*.XML
131 | UpgradeLog*.htm
132 |
133 | # SQL Server files
134 | App_Data/*.mdf
135 | App_Data/*.ldf
136 |
137 |
138 | #LightSwitch generated files
139 | GeneratedArtifacts/
140 | _Pvt_Extensions/
141 | ModelManifest.xml
142 |
143 | # =========================
144 | # Windows detritus
145 | # =========================
146 |
147 | # Windows image file caches
148 | Thumbs.db
149 | ehthumbs.db
150 |
151 | # Folder config file
152 | Desktop.ini
153 |
154 | # Recycle Bin used on file shares
155 | $RECYCLE.BIN/
156 |
157 | # Mac desktop service store files
158 | .DS_Store
159 |
160 | # ===================================================
161 | # Exclude F# project specific directories and files
162 | # ===================================================
163 |
164 | # NuGet Packages Directory
165 | packages/
166 |
167 | # Temp folder used for publishing docs
168 | temp/
169 |
170 | # Test results produced by build
171 | TestResults.xml
172 |
173 | # Nuget outputs
174 | nuget/*.nupkg
175 | release.cmd
176 | release.sh
177 | localpackages/
178 | paket-files
179 | *.orig
180 | .paket/paket.exe
181 | docs/content/license.md
182 | docs/content/release-notes.md
183 | debugEnv
184 | /envs/serviceEnv
185 | password.txt
186 | /Cronix.Tests.dll.html
187 | /Cronix.Tests.dll.xml
188 | output
189 | /Cronix.Tests.dll.html
190 | /Cronix.Tests.dll.xml
191 | /Cronix.Tests.dll.html
192 | src/Cronix/webui/
193 | _NCrunch_Cronix
194 | /_NCrunch_Cronix.All
195 | /PrecompiledWeb
196 |
--------------------------------------------------------------------------------
/.paket/paket.bootstrapper.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/.paket/paket.bootstrapper.exe
--------------------------------------------------------------------------------
/.paket/paket.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | true
6 |
7 | true
8 | $(MSBuildThisFileDirectory)
9 | $(MSBuildThisFileDirectory)..\
10 |
11 |
12 |
13 | $(PaketToolsPath)paket.exe
14 | $(PaketToolsPath)paket.bootstrapper.exe
15 | "$(PaketExePath)"
16 | mono --runtime=v4.0.30319 $(PaketExePath)
17 | "$(PaketBootStrapperExePath)"
18 | mono --runtime=v4.0.30319 $(PaketBootStrapperExePath)
19 |
20 | $(PaketCommand) restore
21 | $(PaketBootStrapperCommand)
22 |
23 | RestorePackages; $(BuildDependsOn);
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: fsharp
2 |
3 | sudo: false # use the new container-based Travis infrastructure
4 |
5 | script:
6 | - ./build.sh RunTests
7 |
--------------------------------------------------------------------------------
/Cronix.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 2013
3 | VisualStudioVersion = 12.0.31101.0
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B98-5CED-492C-A5B7-A5B4F73CF142}"
6 | ProjectSection(SolutionItems) = preProject
7 | paket.dependencies = paket.dependencies
8 | paket.lock = paket.lock
9 | EndProjectSection
10 | EndProject
11 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}"
12 | EndProject
13 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cronix", "src\Cronix\Cronix.fsproj", "{1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}"
14 | EndProject
15 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
16 | ProjectSection(SolutionItems) = preProject
17 | build.fsx = build.fsx
18 | README.md = README.md
19 | RELEASE_NOTES.md = RELEASE_NOTES.md
20 | todo.txt = todo.txt
21 | EndProjectSection
22 | EndProject
23 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175-43B1-4C90-A1EE-8E351C33435D}"
24 | ProjectSection(SolutionItems) = preProject
25 | docs\tools\generate.fsx = docs\tools\generate.fsx
26 | docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml
27 | EndProjectSection
28 | EndProject
29 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}"
30 | ProjectSection(SolutionItems) = preProject
31 | docs\content\cronix setup.fsx = docs\content\cronix setup.fsx
32 | docs\content\index.fsx = docs\content\index.fsx
33 | docs\content\startup script.fsx = docs\content\startup script.fsx
34 | EndProjectSection
35 | EndProject
36 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}"
37 | EndProject
38 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cronix.Tests", "tests\Cronix.Tests\Cronix.Tests.fsproj", "{F0620B10-2EC7-426D-88F4-FBD6762BAABE}"
39 | EndProject
40 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{B6255659-79E8-4AC2-AD13-321960F13DF4}"
41 | EndProject
42 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpSample", "docs\samples\CSharpSample\CSharpSample.csproj", "{06322D90-9A28-423C-9805-AC1393A8F18D}"
43 | EndProject
44 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpSample.Jobs", "docs\samples\CSharpSample.Jobs\CSharpSample.Jobs.csproj", "{5C018694-E498-4971-AF52-4E4343DC38FC}"
45 | EndProject
46 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpSample", "docs\samples\FSharpSample\FSharpSample.fsproj", "{1CBB9793-714B-42A9-AD03-12B15FB71967}"
47 | EndProject
48 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cronix.Web", "src\Cronix.Web\Cronix.Web.fsproj", "{14621A39-B196-41A7-A370-907C9381BC3F}"
49 | EndProject
50 | Global
51 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
52 | Debug|Any CPU = Debug|Any CPU
53 | Debug|Mixed Platforms = Debug|Mixed Platforms
54 | Debug|x86 = Debug|x86
55 | Release|Any CPU = Release|Any CPU
56 | Release|Mixed Platforms = Release|Mixed Platforms
57 | Release|x86 = Release|x86
58 | EndGlobalSection
59 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
60 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Debug|Any CPU.Build.0 = Debug|Any CPU
62 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
63 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
64 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Debug|x86.ActiveCfg = Debug|Any CPU
65 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Release|Any CPU.ActiveCfg = Release|Any CPU
66 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Release|Any CPU.Build.0 = Release|Any CPU
67 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
68 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
69 | {1AB7E0B7-C56E-4A50-B5FA-7AD04F56C17C}.Release|x86.ActiveCfg = Release|Any CPU
70 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Debug|Any CPU.Build.0 = Debug|Any CPU
72 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
73 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
74 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Debug|x86.ActiveCfg = Debug|Any CPU
75 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Release|Any CPU.ActiveCfg = Release|Any CPU
76 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Release|Any CPU.Build.0 = Release|Any CPU
77 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
78 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
79 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE}.Release|x86.ActiveCfg = Release|Any CPU
80 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Debug|Any CPU.Build.0 = Debug|Any CPU
82 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
83 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
84 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Debug|x86.ActiveCfg = Debug|Any CPU
85 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Release|Any CPU.ActiveCfg = Release|Any CPU
86 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Release|Any CPU.Build.0 = Release|Any CPU
87 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
88 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
89 | {06322D90-9A28-423C-9805-AC1393A8F18D}.Release|x86.ActiveCfg = Release|Any CPU
90 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
92 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
93 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
94 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Debug|x86.ActiveCfg = Debug|Any CPU
95 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
96 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Release|Any CPU.Build.0 = Release|Any CPU
97 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
98 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
99 | {5C018694-E498-4971-AF52-4E4343DC38FC}.Release|x86.ActiveCfg = Release|Any CPU
100 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
101 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Debug|Any CPU.Build.0 = Debug|Any CPU
102 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
103 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
104 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Debug|x86.ActiveCfg = Debug|Any CPU
105 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Release|Any CPU.ActiveCfg = Release|Any CPU
106 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Release|Any CPU.Build.0 = Release|Any CPU
107 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
108 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Release|Mixed Platforms.Build.0 = Release|Any CPU
109 | {1CBB9793-714B-42A9-AD03-12B15FB71967}.Release|x86.ActiveCfg = Release|Any CPU
110 | {14621A39-B196-41A7-A370-907C9381BC3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
111 | {14621A39-B196-41A7-A370-907C9381BC3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
112 | {14621A39-B196-41A7-A370-907C9381BC3F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
113 | {14621A39-B196-41A7-A370-907C9381BC3F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
114 | {14621A39-B196-41A7-A370-907C9381BC3F}.Debug|x86.ActiveCfg = Debug|Any CPU
115 | {14621A39-B196-41A7-A370-907C9381BC3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
116 | {14621A39-B196-41A7-A370-907C9381BC3F}.Release|Any CPU.Build.0 = Release|Any CPU
117 | {14621A39-B196-41A7-A370-907C9381BC3F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
118 | {14621A39-B196-41A7-A370-907C9381BC3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
119 | {14621A39-B196-41A7-A370-907C9381BC3F}.Release|x86.ActiveCfg = Release|Any CPU
120 | EndGlobalSection
121 | GlobalSection(SolutionProperties) = preSolution
122 | HideSolutionNode = FALSE
123 | EndGlobalSection
124 | GlobalSection(NestedProjects) = preSolution
125 | {83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
126 | {8E6D5255-776D-4B61-85F9-73C37AA1FB9A} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
127 | {F0620B10-2EC7-426D-88F4-FBD6762BAABE} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
128 | {B6255659-79E8-4AC2-AD13-321960F13DF4} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
129 | {06322D90-9A28-423C-9805-AC1393A8F18D} = {B6255659-79E8-4AC2-AD13-321960F13DF4}
130 | {5C018694-E498-4971-AF52-4E4343DC38FC} = {B6255659-79E8-4AC2-AD13-321960F13DF4}
131 | {1CBB9793-714B-42A9-AD03-12B15FB71967} = {B6255659-79E8-4AC2-AD13-321960F13DF4}
132 | EndGlobalSection
133 | EndGlobal
134 |
--------------------------------------------------------------------------------
/Install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | function MarkDirectoryAsCopyToOutputRecursive($item)
4 | {
5 | $item.ProjectItems | ForEach-Object { MarkFileASCopyToOutputDirectory($_) }
6 | }
7 |
8 | function MarkFileASCopyToOutputDirectory($item)
9 | {
10 | Try
11 | {
12 | Write-Host Try set $item.Name
13 | $item.Properties.Item("CopyToOutputDirectory").Value = 2
14 | }
15 | Catch
16 | {
17 | Write-Host RecurseOn $item.Name
18 | MarkDirectoryAsCopyToOutputRecursive($item)
19 | }
20 | }
21 |
22 | #Now mark everything in the a directory as "Copy to newer"
23 | MarkDirectoryAsCopyToOutputRecursive($project.ProjectItems.Item("webui"))
24 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://issuestats.com/github/aph5nt/cronix)
2 | [](http://issuestats.com/github/aph5nt/cronix)
3 | [](https://ci.appveyor.com/project/aph5nt/cronix)
4 |
5 | # Cronix
6 |
7 | The 'CRON like' library.
8 |
9 | Documentation: http://aph5nt.github.io/cronix
10 |
11 | ## Maintainer(s)
12 |
13 | - [@aph5nt](https://github.com/aph5nt)
14 |
15 |
--------------------------------------------------------------------------------
/RELEASE_NOTES.md:
--------------------------------------------------------------------------------
1 | ### 0.3.2 - Released
2 | * Minor fixes
3 |
4 | ### 0.3.1 - Released
5 | * Package description fix
6 |
7 | ### 0.3 - Released
8 | * Added web interface (Cronix.Web package)
9 | * Trigger improvements
10 | * Code refactoring and bug fixes
11 |
12 | ### 0.2 - Released
13 | * Documentation fixes
14 | * Unit test fixes
15 | * Code refactoring
16 | * Added support for starting and stopping given job
17 | * Added Cron expression helper
18 |
19 | ### 0.1 - Released
20 | * Initial version of CRONIX service
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | init:
2 | - git config --global core.autocrlf input
3 | build_script:
4 | - cmd: build.cmd RunTests
5 | test: off
6 | version: 0.0.2.{build}
7 | artifacts:
8 | - path: bin
9 | name: bin
10 |
--------------------------------------------------------------------------------
/build.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | cls
3 |
4 | .paket\paket.bootstrapper.exe
5 | if errorlevel 1 (
6 | exit /b %errorlevel%
7 | )
8 |
9 | .paket\paket.exe restore
10 | if errorlevel 1 (
11 | exit /b %errorlevel%
12 | )
13 |
14 | IF NOT EXIST build.fsx (
15 | .paket\paket.exe update
16 | packages\FAKE\tools\FAKE.exe init.fsx
17 | )
18 | packages\FAKE\tools\FAKE.exe build.fsx %*
19 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | if test "$OS" = "Windows_NT"
3 | then
4 | # use .Net
5 |
6 | .paket/paket.bootstrapper.exe
7 | exit_code=$?
8 | if [ $exit_code -ne 0 ]; then
9 | exit $exit_code
10 | fi
11 |
12 | .paket/paket.exe restore
13 | exit_code=$?
14 | if [ $exit_code -ne 0 ]; then
15 | exit $exit_code
16 | fi
17 |
18 | [ ! -e build.fsx ] && .paket/paket.exe update
19 | [ ! -e build.fsx ] && packages/FAKE/tools/FAKE.exe init.fsx
20 | packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
21 | else
22 | # use mono
23 | mono .paket/paket.bootstrapper.exe
24 | exit_code=$?
25 | if [ $exit_code -ne 0 ]; then
26 | exit $exit_code
27 | fi
28 |
29 | mono .paket/paket.exe restore
30 | exit_code=$?
31 | if [ $exit_code -ne 0 ]; then
32 | exit $exit_code
33 | fi
34 |
35 | [ ! -e build.fsx ] && mono .paket/paket.exe update
36 | [ ! -e build.fsx ] && mono packages/FAKE/tools/FAKE.exe init.fsx
37 | mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
38 | fi
39 |
--------------------------------------------------------------------------------
/docs/content/cronix service installation.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Cronix service installation
3 | ======================
4 |
5 | How to install your cronix service ?
6 |
7 |
8 |
9 |
10 |
11 | The Cronix library can be
installed from NuGet :
12 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe install
13 |
14 |
15 |
16 |
17 |
18 |
19 | How to uninstall your cronix service ?
20 |
21 |
22 |
23 |
24 |
25 | The Cronix library can be
installed from NuGet :
26 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe uninstall
27 |
28 |
29 |
30 |
31 |
32 | How to run your cronix service without installing it ?
33 |
34 |
35 |
36 |
37 |
38 | The Cronix library can be
installed from NuGet :
39 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe debug
40 |
41 |
42 |
43 |
44 |
45 | How to display help ?
46 |
47 |
48 |
49 |
50 |
51 | The Cronix library can be
installed from NuGet :
52 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe typeAnythingElseHere
53 |
54 |
55 |
56 |
57 |
58 | **)
--------------------------------------------------------------------------------
/docs/content/developers guide.fsx:
--------------------------------------------------------------------------------
1 | (*** hide ***)
2 | // This block of code is omitted in the generated HTML documentation. Use
3 | // it to define helpers that you do not want to show in the documentation.
4 | #I "../../bin"
5 |
6 | (**
7 |
8 | # The developer's guide
9 | ## Creating new project
10 |
11 | The best point to get started with Cronix library is to take a look at the Generic Sample Projects. They can be found here
12 | The following developer's guide will briefly walk througth some important topics which are worth to mention.
13 |
14 |
15 | ## Configuration
16 | * Logging
17 |
18 | By deafult, Cronix uses NLOG library for logging. To enable logging the NLOG.config file should be added to your Cronix project.
19 |
20 |
21 | ## WebUI
22 | * Configuration
23 |
24 | Cronix supports self-hosted web interface. By default it uses the 8111 port. In order to change it, add the following key in the app.config file into appSettings section
25 |
26 | <add key="host.port" value="8080" />
27 |
28 | If the default port value is changed, then the global variable named "connectionUrl" in the webui/index.html file must also be changed.
29 |
30 |
31 | <!-- GLOBAL CONFIGURATION -->
32 | <script type="text/javascript">
33 | var connectionUrl = "http://localhost:8111/signalr";
34 | </script>
35 |
36 |
37 |
38 | * Overview
39 |
40 |
41 |
42 | In order to enable webui, the Cronix.Web package must be installed and the WebPlugin must be initialized while bootstraping (as on snippet bellow).
43 |
44 | F# Sample
45 | *)
46 |
47 | open System
48 | open Cronix
49 | open Chessie.ErrorHandling
50 | open System.Threading
51 | open Cronix.Web
52 |
53 | []
54 | let main argv =
55 |
56 | let startupHandler =
57 | new StartupHandler(
58 | fun(scheduler) ->
59 | WebPlugin.InitPlugin(scheduler) |> ignore
60 | )
61 |
62 | BootStrapper.InitService(argv, startupHandler) |> ignore
63 | 0 // return an integer exit code
64 |
65 |
66 | (**
67 |
68 | C# Sample
69 |
70 | *)
71 |
72 |
73 | public static void Main(string[] args)
74 | {
75 | BootStrapper.InitService(args, scheduler =>
76 | {
77 | WebPlugin.InitPlugin(scheduler);
78 | });
79 | }
80 |
81 | (**
82 |
83 | ## Job scheduling
84 | * Build-in schedules
85 |
86 | A Build in schedule is a hardcoded schedule definition that will create a trigger for a job at each Cronix application startup. Even if that trigger will be uncheduled, it will reschedule again after restart of your application.
87 |
88 | C# Sample - build-in schedule:
89 | *)
90 |
91 | public static void Main(string[] args)
92 | {
93 | BootStrapper.InitService(args, scheduler =>
94 | {
95 | scheduler.ScheduleJob("scheduled job", "* * * * *", EmbededJobs.Callback);
96 | scheduler.ScheduleJob("scheduled job", Dsl.frequency(Dsl.CronExpr.Daily), EmbededJobs.Callback);
97 | });
98 | }
99 |
100 | (**
101 | * StartupScript
102 |
103 | Having a startup script gives the ability to add custom jobs to your application without need od recompilation of your Cronix project.
104 | Custom dll's can be referenced, and the new schedule definitions can be freely modified.
105 | The Startup.fsx file must be placed in your Cronix project (it must have 'Copy to build directory' property set to True).
106 | It must follow the namespace, module and start method convention.
107 |
108 | Sample startup script:
109 | *)
110 |
111 | #if INTERACTIVE
112 | #I "."
113 | #I "bin\Debug"
114 | #I "bin\Release"
115 | #r "Cronix.dll"
116 | #r "Chessie.dll"
117 | #endif
118 |
119 | namespace Cronix.Startup
120 |
121 | module RunAtStartup =
122 |
123 | open System.Threading
124 | open System
125 | open Cronix
126 |
127 | /// sample job
128 | let sampleJob (token : CancellationToken) =
129 | printf "callback executed at (UTC) %s\n" <| DateTime.UtcNow.ToString()
130 | Thread.Sleep 100
131 |
132 | let start (scheduler : IScheduleManager) =
133 |
134 | // schedules goes here!
135 | scheduler.ScheduleJob "job1" "* * * * *" <| JobCallback(sampleJob) |> ignore
136 | ()
137 |
138 |
139 | (**
140 |
141 |
142 | ## Windows service
143 | In order to see what are the availiable command line options, run your Cronix application in the command line without any parameters.
144 | The sample usage will be shown as in sample bellow.
145 |
146 |
147 |
148 |
149 |
150 | C:\>YourCronixApp.exe
151 | Usage:
152 | YourCronixApp debug
153 | - Starts 'YourCronixApp' in the interactive mode.
154 | YourCronixApp install
155 | - Installs 'YourCronixApp' as a Windows service.
156 | YourCronixApp uninstall
157 | - Uninstalls 'YourCronixApp' as a Windows service.
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | *)
166 |
167 |
--------------------------------------------------------------------------------
/docs/content/index.fsx:
--------------------------------------------------------------------------------
1 | (*** hide ***)
2 | // This block of code is omitted in the generated HTML documentation. Use
3 | // it to define helpers that you do not want to show in the documentation.
4 | #I "../../bin"
5 |
6 | (**
7 | Cronix
8 | ======================
9 |
10 | # What is Cronix?
11 | Cronix is an open source job scheduling library. It can be easily used to create window services or be embedded in your windows / console applications. Cronix supports compiled and external job registration.
12 | The external ones are written in a F# start-up script as a template. They can be changed whenever you want - no recompilation of your application will be required. Job scheduling is based on CRON expressions.
13 | Cronix works well with C# and F# applications.
14 |
15 | How to install ?
16 |
17 |
18 |
19 |
20 |
21 | The Cronix library can be
installed from NuGet :
22 |
PM> Install-Package Cronix
23 |
PM> Install-Package Cronix.Web
24 |
25 |
26 |
27 |
28 |
29 |
30 | Documentation
31 | --------------------------
32 |
33 | * [The Architecture Overview](the big picture.html)
34 |
35 | * [The developer's guide ](developers guide.html)
36 |
37 | * [Samples](https://github.com/aph5nt/cronix/tree/master/docs/samples)
38 |
39 | * [API Reference](reference/index.html) contains automatically generated documentation for all types, modules
40 | and functions in the library. This includes additional brief samples on using most of the
41 | functions.
42 |
43 | Troubleshooting
44 | --------------------------
45 |
46 | * [If FSharpCore.dll 4.3.0 was not found](http://blog.ploeh.dk/2014/01/30/how-to-use-fsharpcore-430-when-all-you-have-is-431/)
47 |
48 |
49 | Contributing and copyright
50 | --------------------------
51 |
52 | The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
53 | the project and submit pull requests. If you're adding a new public API, please also
54 | consider adding [samples][content] that can be turned into a documentation. You might
55 | also want to read the [library design notes][readme] to understand how it works.
56 |
57 | The library is available under Public Domain license, which allows modification and
58 | redistribution for both commercial and non-commercial purposes. For more information see the
59 | [License file][license] in the GitHub repository.
60 |
61 | [content]: https://github.com/fsprojects/Cronix/tree/master/docs/content
62 | [gh]: https://github.com/aph5nt/cronix
63 | [issues]: https://github.com/aph5nt/cronix/issues
64 | [readme]: https://github.com/aph5nt/cronix/blob/master/README.md
65 | [license]: https://github.com/aph5nt/cronix/blob/master/LICENSE.txt
66 |
67 | *)
68 |
--------------------------------------------------------------------------------
/docs/content/settingup WebUI.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Cronix service installation
3 | ======================
4 |
5 | How to install your cronix service ?
6 |
7 |
8 |
9 |
10 |
11 | The Cronix library can be
installed from NuGet :
12 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe install
13 |
14 |
15 |
16 |
17 |
18 |
19 | How to uninstall your cronix service ?
20 |
21 |
22 |
23 |
24 |
25 | The Cronix library can be
installed from NuGet :
26 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe uninstall
27 |
28 |
29 |
30 |
31 |
32 | How to run your cronix service without installing it ?
33 |
34 |
35 |
36 |
37 |
38 | The Cronix library can be
installed from NuGet :
39 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe debug
40 |
41 |
42 |
43 |
44 |
45 | How to display help ?
46 |
47 |
48 |
49 |
50 |
51 | The Cronix library can be
installed from NuGet :
52 |
C:\Workplace\cronix\samples\FSharpSample\bin\debug> FSharpSample.exe typeAnythingElseHere
53 |
54 |
55 |
56 |
57 | *)
58 |
--------------------------------------------------------------------------------
/docs/content/startup script.fsx:
--------------------------------------------------------------------------------
1 | (*** hide ***)
2 | // This block of code is omitted in the generated HTML documentation. Use
3 | // it to define helpers that you do not want to show in the documentation.
4 | #I "../../bin"
5 |
6 | (**
7 | Defining and configuring jobs with startup.fsx file.
8 |
9 | The startup script manual
10 | ========================
11 |
12 | Introduction: What is startup.fsx file for?
13 |
14 | The intention of having a seperate file for configuring jobs, is to give developers the flexibility and ease of use.
15 | In the startup.fsx file, developer can configure and schedule jobs embeded in the service assembly and also reference
16 | external assemblies and create custom jobs on fly!
17 | Startup script is compiled on the Cronix service startup time.
18 |
19 | Sample script:
20 |
21 | - Lets take a look how does the minimalistic startup.fsx file looks like.
22 | *)
23 |
24 |
25 | // We reference assemblies for Visual Studio intellisense support.
26 | #if INTERACTIVE
27 | #I "."
28 | #I "bin\Debug"
29 | #I "bin\Release"
30 | #r "Cronix.dll"
31 | #r "CSharpSample.exe" // this is our executable where we had initialized Cronix service.
32 | #r "Chessie.dll"
33 | #endif
34 |
35 | /// This namespace is required.
36 | namespace Cronix.Startup
37 |
38 | /// This module is required.
39 | module RunAtStartup =
40 |
41 | open System.Threading
42 | open System
43 | open Cronix
44 | open CSharpSample.Jobs
45 |
46 | /// startup method
47 | let start (scheduler : IScheduleManager) =
48 | scheduler.Schedule "my job name" "* * * * *" <| Callback(sampleJob) |> ignore
49 | ()
50 |
51 | (**
52 | and more complex example...
53 | *)
54 |
55 | #if INTERACTIVE
56 | #I "."
57 | #I "bin\Debug"
58 | #I "bin\Release"
59 | #r "Cronix.dll"
60 | #r "CSharpSample.exe"
61 | #r "CSharpSample.Jobs.dll"
62 | #r "Chessie.dll"
63 | //#r "YourTask.dll"
64 | #endif
65 |
66 | namespace Cronix.Startup
67 |
68 | module RunAtStartup =
69 |
70 | open System.Threading
71 | open System
72 | open Cronix
73 |
74 | //reference yours custom assembly here
75 | open CSharpSample
76 | open CSharpSample.Jobs
77 |
78 | // inline job
79 | let sampleJob (token : CancellationToken) =
80 | printf "callback executed at (UTC) %s\n" <| DateTime.UtcNow.ToString()
81 | Thread.Sleep 100
82 |
83 | let start (scheduler : IScheduleManager) =
84 | scheduler.Schedule "inline job" <| "* * * * *" <| Callback(sampleJob) |> ignore
85 | scheduler.Schedule "job from external assembly" <| "* * * * *" <| Callback(ExternalJobs.Callback) |> ignore
86 | scheduler.Schedule "job defined inside the cronix service" <| "* * * * *" <| Callback(EmbededJobs.Callback) |> ignore
87 | scheduler.Schedule "with frequency helper" <| frequency Hourly <| Callback( sampleJob ) |> ignore
88 | ()
89 |
90 | (**
91 | Adding Startup.fsx file to the Cronix service
92 |
93 | - Just create new Startup.fsx file inside your Cronix project root directory, type your code there (use one of these samples) and change file property 'Copy to Output Directory' to 'Copy always'.
94 | *)
95 |
--------------------------------------------------------------------------------
/docs/content/the big picture.fsx:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | # The Big Picture
4 |
5 | #
6 |
7 | ## JobCallback
8 | JobCallback represents a single unit of work which will be executed after pulling a trigger.
9 |
10 | ## Trigger
11 | Triggering is a mechanism responsible for executing JobCallback at given occurrence date. The occurrence date is calculated during trigger creation and again after each JobCallback execution. Each trigger can run only one JobCallback at time, so it is not possible to start ne JobCallback execution while previous one is still running.
12 |
13 | ## Schedule Manager
14 | Schedule Manager is the main component which communicates with the triggers. It can schedule or unschedule a new job (create or delete a trigger), enable or disable a trigger, fire or terminate execution of given trigger. Schedule Manager supervises the state of all triggers.
15 |
16 | ## Start-up script
17 | It's a F# fsx file which holds the source code for job scheduling.
18 |
19 | ##Script Compiler
20 | Compiles the Start-up script into Cronix.Startup.dll on each application start.
21 |
22 | ##Bootstrapper
23 | The bootstrapper initializes the entire Cronix library. It's responsible for service installation, compiling the start-up script, job scheduling or even hosting the webui.
24 |
25 | ## WebUI
26 | WebUI is a simple self-hosted web interface. It allows to manage the scheduled triggers.
27 |
28 | *)
--------------------------------------------------------------------------------
/docs/files/img/logo-template.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/docs/files/img/logo-template.pdn
--------------------------------------------------------------------------------
/docs/files/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/docs/files/img/logo.png
--------------------------------------------------------------------------------
/docs/files/img/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/docs/files/img/overview.png
--------------------------------------------------------------------------------
/docs/files/img/overview.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/docs/files/img/overview.pptx
--------------------------------------------------------------------------------
/docs/files/img/webui.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aph5nt/cronix/0ed71e23c9d52eff2685888efc1884a7c2603aeb/docs/files/img/webui.PNG
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/BitstampTicker.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 2a46137f-277f-4bff-a58d-15cbf0b2a2c9
9 | Library
10 | BitstampTicker
11 | BitstampTicker
12 | v4.5
13 | 4.3.1.0
14 | BitstampTicker
15 | 7d31a91a
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | 3
25 | bin\Debug\BitstampTicker.XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\Release\
32 | TRACE
33 | 3
34 | bin\Release\BitstampTicker.XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | ..\..\..\packages\FSharp.Data.2.2.2\lib\net40\FSharp.Data.dll
63 | True
64 |
65 |
66 | ..\..\..\packages\SQLProvider.0.0.9-alpha\lib\net40\FSharp.Data.SqlProvider.dll
67 | True
68 |
69 |
70 |
71 |
72 |
73 |
74 | ..\..\..\packages\System.Data.SQLite.Core.1.0.96.0\lib\net45\System.Data.SQLite.dll
75 | True
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
85 |
86 |
87 |
88 |
95 |
96 |
97 |
98 |
99 | ..\..\..\packages\Zlib.Portable\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll
100 | True
101 | True
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/Exchange.fs:
--------------------------------------------------------------------------------
1 | namespace BitstampTicker
2 |
3 | open FSharp.Data
4 | open FSharp.Data.Sql
5 |
6 | module Exchange =
7 |
8 | []
9 | let connectionString = @"Data Source=.;Initial Catalog=Bitstamp;Integrated Security=True;Pooling=False"
10 |
11 | []
12 | let fetchUrl = "https://www.bitstamp.net/api/ticker/"
13 |
14 | []
15 | let sample = """ {"high": "237.99", "last": "236.95", "timestamp": "1431795831", "bid": "236.85", "vwap": "236.57", "volume": "3291.57347664", "low": "235.01", "ask": "236.95"} """
16 |
17 | type Database = SqlDataProvider
18 | type BitStamp = JsonProvider
19 |
20 | let fetchData() =
21 | BitStamp.Parse <| Http.RequestString fetchUrl
22 |
23 | let insertData() =
24 | let fetchedData = BitStamp.Parse <| Http.RequestString fetchUrl
25 | let context = Database.GetDataContext()
26 | let tick = context.``[dbo].[Ticks]``.Create()
27 | tick.Ask <- fetchedData.Ask
28 | tick.Bid <- fetchedData.Bid
29 | tick.High <- fetchedData.High
30 | tick.Last <- fetchedData.Last
31 | tick.Low <- fetchedData.Low
32 | tick.Timestamp <- fetchedData.Timestamp
33 | tick.Volume <- fetchedData.Volume
34 | tick.Vwap <- fetchedData.Vwap
35 |
36 | context.SubmitUpdates() |> ignore
37 |
38 |
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/Script.fsx:
--------------------------------------------------------------------------------
1 | // Learn more about F# at http://fsharp.net. See the 'F# Tutorial' project
2 | // for more guidance on F# programming.
3 |
4 | #load "Library1.fs"
5 | open BitstampTicker
6 |
7 | // Define your library scripting code here
8 |
9 |
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/SqlCreate.txt:
--------------------------------------------------------------------------------
1 | CREATE TABLE [dbo].[Ticks] (
2 | [Id] BIGINT IDENTITY (1, 1) NOT NULL,
3 | [High] DECIMAL (18, 2) NOT NULL,
4 | [Last] DECIMAL (18, 2) NOT NULL,
5 | [Bid] DECIMAL (18, 2) NOT NULL,
6 | [Vwap] DECIMAL (18, 2) NOT NULL,
7 | [Volume] DECIMAL (18, 2) NOT NULL,
8 | [Low] DECIMAL (18, 2) NOT NULL,
9 | [Ask] DECIMAL (18, 2) NOT NULL,
10 | [Timestamp] INT NOT NULL,
11 | PRIMARY KEY CLUSTERED ([Id] DESC)
12 | );
13 |
14 |
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/Types.fs:
--------------------------------------------------------------------------------
1 | module Types
2 |
3 | // Fiat currencies
4 | [] type USD
5 |
6 | // Crypto currencies
7 | [] type BTC
8 |
9 | // Currency pairs
10 | [] type BTCUSD = BTC/USD
11 | [] type USDBTC = USD/BTC
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/samples/BitstampTicker/paket.references:
--------------------------------------------------------------------------------
1 | FSharp.Data
2 | SQLProvider
--------------------------------------------------------------------------------
/docs/samples/CSharpSample.Jobs/CSharpSample.Jobs.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {5C018694-E498-4971-AF52-4E4343DC38FC}
8 | Library
9 | Properties
10 | CSharpSample.Jobs
11 | CSharpSample.Jobs
12 | v4.5
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 | false
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | false
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
56 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample.Jobs/ExternalJobs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace CSharpSample.Jobs
9 | {
10 | public class ExternalJobs
11 | {
12 | public static void Callback(CancellationToken token)
13 | {
14 | Console.WriteLine("executing embeded job from CSharpSample.dll at {0}", DateTime.Now);
15 | Thread.Sleep(100);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample.Jobs/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("CSharpSample.Jobs")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CSharpSample.Jobs")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5c018694-e498-4971-af52-4e4343dc38fc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/NLog.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/Program.cs:
--------------------------------------------------------------------------------
1 | using Chessie.ErrorHandling.CSharp;
2 | using Cronix;
3 | using Microsoft.FSharp.Core;
4 | using System;
5 | using System.Linq;
6 | using System.Threading;
7 |
8 | namespace CSharpSample
9 | {
10 | public static class EmbededJobs
11 | {
12 | public static void Callback(CancellationToken token)
13 | {
14 | Console.WriteLine("executing embeded job from CSharpSample.dll at {0}", DateTime.Now);
15 | Thread.Sleep(100);
16 | }
17 | }
18 |
19 | public class Program
20 | {
21 | public static void Main(string[] args)
22 | {
23 | var result = BootStrapper.InitService(args, scheduler =>
24 | {
25 | // schedule your job here
26 | scheduler.ScheduleJob("scheduled job", "* * * * *", EmbededJobs.Callback);
27 | scheduler.ScheduleJob("scheduled job", Dsl.frequency(Dsl.CronExpr.Daily), EmbededJobs.Callback);
28 | });
29 | result.Match(
30 | (state, msgs) =>
31 | {
32 | Console.WriteLine(state);
33 | },
34 | (msgs) =>
35 | {
36 | msgs.ToList().ForEach(Console.WriteLine);
37 | });
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("CSharpSample")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CSharpSample")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("06322d90-9a28-423c-9805-ac1393a8f18d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/Startup.fsx:
--------------------------------------------------------------------------------
1 | (*
2 | Best practices:
3 | - Design startup script with visual studio
4 | - reference your dll with jobs for F# interactive (while editing this script)
5 | - remember to open(import) your job dll inside RunAtStartup module
6 | *)
7 |
8 | #if INTERACTIVE
9 | #I "."
10 | #I "bin\Debug"
11 | #I "bin\Release"
12 | #r "Cronix.dll"
13 | #r "CSharpSample.exe"
14 | #r "CSharpSample.Jobs.dll"
15 | #r "Chessie.dll"
16 | //#r "YourTask.dll"
17 | #endif
18 |
19 | namespace Cronix.Startup
20 |
21 | module RunAtStartup =
22 |
23 | open System.Threading
24 | open System
25 | open Cronix
26 | open Messages
27 |
28 | //open YourJob.dll must be opened here!
29 | open CSharpSample
30 | open CSharpSample.Jobs
31 |
32 | // sample job
33 | let sampleJob (token : CancellationToken) =
34 | printf "callback executed at (UTC) %s\n" <| DateTime.UtcNow.ToString()
35 | Thread.Sleep 100
36 |
37 |
38 | // open your dll with tasks here
39 | let start (scheduler : IScheduleManager) =
40 |
41 | // schedules goes here!
42 | scheduler.ScheduleJob "job1" "* * * * *" <| JobCallback(sampleJob) |> ignore
43 |
44 | scheduler.ScheduleJob "job2" "* * * * *" <| JobCallback(ExternalJobs.Callback) |> ignore
45 |
46 | scheduler.ScheduleJob "job3" "* * * * *" <| JobCallback(EmbededJobs.Callback) |> ignore
47 |
48 |
49 | ()
--------------------------------------------------------------------------------
/docs/samples/CSharpSample/paket.references:
--------------------------------------------------------------------------------
1 | NLog
2 | NCronTab
3 | chessie
4 | Microsoft.AspNet.SignalR.Core
5 | Microsoft.AspNet.SignalR.SystemWeb
6 | Microsoft.Owin
7 | Microsoft.Owin.Hosting
8 | Microsoft.Owin.Host.SystemWeb
9 | Microsoft.Owin.Security
10 | Microsoft.Owin.Host.HttpListener
11 | Owin
12 | Microsoft.Owin.Diagnostics
13 | Microsoft.Owin.Cors
--------------------------------------------------------------------------------
/docs/samples/CryptoTicker/CryptoTicker.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 8460c741-3498-4835-a2a6-4209e9b96206
9 | Library
10 | CryptoTicker
11 | CryptoTicker
12 | v4.5
13 | 4.3.1.0
14 | CryptoTicker
15 |
16 |
17 | true
18 | full
19 | false
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | 3
24 |
25 |
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\Release\
32 | TRACE
33 | 3
34 | bin\Release\CryptoTicker.XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | True
61 |
62 |
63 |
64 |
65 |
66 |
67 |
74 |
75 |
76 |
77 |
78 | ..\..\..\packages\FSharp.Data\lib\portable-net40+sl5+wp8+win8\FSharp.Data.dll
79 | True
80 | True
81 |
82 |
83 |
84 |
85 |
86 |
87 | ..\..\..\packages\FSharp.Data\lib\net40\FSharp.Data.dll
88 | True
89 | True
90 |
91 |
92 | True
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | ..\..\..\packages\SQLProvider\lib\net40\FSharp.Data.SqlProvider.dll
102 | True
103 | True
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | ..\..\..\packages\Zlib.Portable\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll
113 | True
114 | True
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/docs/samples/CryptoTicker/Exchange.fs:
--------------------------------------------------------------------------------
1 | namespace BitstampTicker
2 |
3 | open FSharp.Data
4 | open FSharp.Data.Sql
5 |
6 | module Exchange =
7 |
8 | []
9 | let connectionString = @"Data Source=.;Initial Catalog=Bitstamp;Integrated Security=True;Pooling=False"
10 |
11 | []
12 | let fetchUrl = "https://www.bitstamp.net/api/ticker/"
13 |
14 | []
15 | let sample = """ {"high": "237.99", "last": "236.95", "timestamp": "1431795831", "bid": "236.85", "vwap": "236.57", "volume": "3291.57347664", "low": "235.01", "ask": "236.95"} """
16 |
17 | type Database = SqlDataProvider
18 | type BitStamp = JsonProvider
19 |
20 | let insertData() =
21 | let fetchedData = BitStamp.Parse <| Http.RequestString fetchUrl
22 | let context = Database.GetDataContext()
23 | let tick = context.``[dbo].[Ticks]``.Create()
24 | tick.Exchange <- "Bitstamp"
25 | tick.Ask <- fetchedData.Ask
26 | tick.Bid <- fetchedData.Bid
27 | tick.High <- fetchedData.High
28 | tick.Last <- fetchedData.Last
29 | tick.Low <- fetchedData.Low
30 | tick.Timestamp <- fetchedData.Timestamp
31 | tick.Volume <- fetchedData.Volume
32 | tick.Vwap <- fetchedData.Vwap
33 |
34 | context.SubmitUpdates() |> ignore
--------------------------------------------------------------------------------
/docs/samples/CryptoTicker/SqlCreate.txt:
--------------------------------------------------------------------------------
1 | USE [Bitstamp]
2 | GO
3 |
4 | /****** Object: Table [dbo].[Ticks] Script Date: 17/05/2015 08:46:37 ******/
5 | SET ANSI_NULLS ON
6 | GO
7 |
8 | SET QUOTED_IDENTIFIER ON
9 | GO
10 |
11 | CREATE TABLE [dbo].[Ticks](
12 | [Id] [bigint] IDENTITY(1,1) NOT NULL,
13 | [Exchange] [nvarchar](10) NOT NULL,
14 | [Timestamp] [int] NOT NULL,
15 | [High] [decimal](18, 2) NOT NULL,
16 | [Low] [decimal](18, 2) NOT NULL,
17 | [Last] [decimal](18, 2) NOT NULL,
18 | [Volume] [decimal](18, 2) NOT NULL,
19 | [Ask] [decimal](18, 2) NOT NULL,
20 | [Bid] [decimal](18, 2) NOT NULL,
21 | [Vwap] [decimal](18, 2) NOT NULL,
22 | CONSTRAINT [PK_Ticks_1] PRIMARY KEY NONCLUSTERED
23 | (
24 | [Id] ASC
25 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
26 | CONSTRAINT [PK_Exchange_Timestamp] UNIQUE CLUSTERED
27 | (
28 | [Exchange] ASC,
29 | [Timestamp] DESC
30 | )WITH (PAD_INDEX = ON, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
31 | ) ON [PRIMARY]
32 |
33 | GO
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/samples/CryptoTicker/paket.references:
--------------------------------------------------------------------------------
1 | FSharp.Data
2 | SQLProvider
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace FSharpSample.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | (* General Information about an assembly is controlled through the following
8 | set of attributes. Change these attribute values to modify the information
9 | associated with an assembly. *)
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | (* Setting ComVisible to false makes the types in this assembly not visible
20 | to COM components. If you need to access a type in this assembly from
21 | COM, set the ComVisible attribute to true on that type. *)
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | (* Version information for an assembly consists of the following four values:
28 |
29 | Major Version
30 | Minor Version
31 | Build Number
32 | Revision
33 |
34 | You can specify all the values or you can default the Build and Revision Numbers
35 | by using the '*' as shown below:
36 | [] *)
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/NLog.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/Program.fs:
--------------------------------------------------------------------------------
1 | open System
2 | open Cronix
3 | open Chessie.ErrorHandling
4 | open System.Threading
5 | open Cronix.Web
6 |
7 | let sampleJob (token : CancellationToken) =
8 | printf "callback executed at (UTC) %s\n" <| DateTime.UtcNow.ToString()
9 | Thread.Sleep(10000)
10 |
11 | []
12 | let main argv =
13 |
14 | let startupHandler =
15 | new StartupHandler(
16 | fun(scheduler) ->
17 |
18 | WebPlugin.InitPlugin(scheduler) |> ignore
19 |
20 | scheduler.ScheduleJob "scheduled job" <| "* * * * *" <| JobCallback( sampleJob ) |> ignore
21 | scheduler.ScheduleJob "second name" <| frequency Hourly <| JobCallback( sampleJob ) |> ignore
22 | )
23 |
24 | let result = BootStrapper.InitService(argv, startupHandler)
25 | match result with
26 | | Ok (state, msgs) -> printfn "%s" state
27 | | Fail msgs -> msgs |> List.iter(fun(s) -> printfn "%s" s)
28 | | _ -> ()
29 | 0 // return an integer exit code
30 |
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/Startup.fsx:
--------------------------------------------------------------------------------
1 | #if INTERACTIVE
2 | #I "."
3 | #I "bin\Debug"
4 | #I "bin\Release"
5 | #r "Cronix.dll"
6 | #r "Chessie.dll"
7 | #r "CryptoTicker.dll"
8 | #endif
9 |
10 | namespace Cronix.Startup
11 |
12 | module RunAtStartup =
13 |
14 | open System.Threading
15 | open System
16 | open Cronix
17 | open BitstampTicker
18 |
19 | /// sample job
20 | let sampleJob (token : CancellationToken) =
21 | printf "callback executed at (UTC) %s\n" <| DateTime.UtcNow.ToString()
22 | Thread.Sleep 100
23 |
24 | let cryptoTickerJob (token : CancellationToken) =
25 | Exchange.insertData()
26 | printf "executed cryptoTickerJob job at (UTC) %s\n" <| DateTime.UtcNow.ToString()
27 | Thread.Sleep 100
28 |
29 | /// open your dll with tasks here
30 | let start (scheduler : IScheduleManager) =
31 |
32 | // schedules goes here!
33 | scheduler.ScheduleJob "job1" "* * * * *" <| JobCallback(sampleJob) |> ignore
34 |
35 | scheduler.ScheduleJob "cryptoTickerJob" "* * * * *" <| JobCallback(cryptoTickerJob) |> ignore
36 | ()
37 |
--------------------------------------------------------------------------------
/docs/samples/FSharpSample/paket.references:
--------------------------------------------------------------------------------
1 | NLog
2 | NCronTab
3 | chessie
4 | Microsoft.AspNet.SignalR.Core
5 | Microsoft.AspNet.SignalR.SystemWeb
6 | Microsoft.Owin
7 | Microsoft.Owin.Hosting
8 | Microsoft.Owin.Host.SystemWeb
9 | Microsoft.Owin.Security
10 | Microsoft.Owin.Host.HttpListener
11 | Owin
12 | Microsoft.Owin.Diagnostics
13 | Microsoft.Owin.Cors
14 |
15 | FSharp.Data
16 | SQLProvider
--------------------------------------------------------------------------------
/docs/tools/generate.fsx:
--------------------------------------------------------------------------------
1 | // --------------------------------------------------------------------------------------
2 | // Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory
3 | // (the generated documentation is stored in the 'docs/output' directory)
4 | // --------------------------------------------------------------------------------------
5 |
6 | // Web site location for the generated documentation
7 | let website = "/cronix"
8 |
9 | let githubLink = "http://github.com/aph5nt/cronix"
10 |
11 | // Specify more information about your project
12 | let info =
13 | [ "project-name", "cronix"
14 | "project-author", "aph5nt"
15 | "project-summary", "Cron Library"
16 | "project-github", githubLink
17 | "project-nuget", "http://nuget.org/packages/cronix" ]
18 |
19 | // --------------------------------------------------------------------------------------
20 | // For typical project, no changes are needed below
21 | // --------------------------------------------------------------------------------------
22 |
23 | #I "../../packages/FAKE/tools/"
24 | #load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
25 | #r "NuGet.Core.dll"
26 | #r "FakeLib.dll"
27 | open Fake
28 | open System.IO
29 | open Fake.FileHelper
30 | open FSharp.Literate
31 | open FSharp.MetadataFormat
32 |
33 | // When called from 'build.fsx', use the public project URL as
34 | // otherwise, use the current 'output' directory.
35 | #if RELEASE
36 | let root = website
37 | #else
38 | let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output")
39 | #endif
40 |
41 | // Paths with template/source/output locations
42 | let bin = __SOURCE_DIRECTORY__ @@ "../../bin"
43 | let content = __SOURCE_DIRECTORY__ @@ "../content"
44 | let output = __SOURCE_DIRECTORY__ @@ "../output"
45 | let files = __SOURCE_DIRECTORY__ @@ "../files"
46 | let templates = __SOURCE_DIRECTORY__ @@ "templates"
47 | let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/"
48 | let docTemplate = formatting @@ "templates/docpage.cshtml"
49 |
50 | // Where to look for *.csproj templates (in this order)
51 | let layoutRootsAll = new System.Collections.Generic.Dictionary()
52 | layoutRootsAll.Add("en",[ templates; formatting @@ "templates"
53 | formatting @@ "templates/reference" ])
54 | subDirectories (directoryInfo templates)
55 | |> Seq.iter (fun d ->
56 | let name = d.Name
57 | if name.Length = 2 || name.Length = 3 then
58 | layoutRootsAll.Add(
59 | name, [templates @@ name
60 | formatting @@ "templates"
61 | formatting @@ "templates/reference" ]))
62 |
63 | // Copy static files and CSS + JS from F# Formatting
64 | let copyFiles () =
65 | CopyRecursive files output true |> Log "Copying file: "
66 | ensureDirectory (output @@ "content")
67 | CopyRecursive (formatting @@ "styles") (output @@ "content") true
68 | |> Log "Copying styles and scripts: "
69 |
70 | let references =
71 | if isMono then
72 | // Workaround compiler errors in Razor-ViewEngine
73 | let d = RazorEngine.Compilation.ReferenceResolver.UseCurrentAssembliesReferenceResolver()
74 | let loadedList = d.GetReferences () |> Seq.map (fun r -> r.GetFile()) |> Seq.cache
75 | // We replace the list and add required items manually as mcs doesn't like duplicates...
76 | let getItem name = loadedList |> Seq.find (fun l -> l.Contains name)
77 | [ (getItem "FSharp.Core").Replace("4.3.0.0", "4.3.1.0")
78 | Path.GetFullPath "./../../packages/FSharp.Compiler.Service/lib/net40/FSharp.Compiler.Service.dll"
79 | Path.GetFullPath "./../../packages/FSharp.Formatting/lib/net40/System.Web.Razor.dll"
80 | Path.GetFullPath "./../../packages/FSharp.Formatting/lib/net40/RazorEngine.dll"
81 | Path.GetFullPath "./../../packages/FSharp.Formatting/lib/net40/FSharp.Literate.dll"
82 | Path.GetFullPath "./../../packages/FSharp.Formatting/lib/net40/FSharp.CodeFormat.dll"
83 | Path.GetFullPath "./../../packages/FSharp.Formatting/lib/net40/FSharp.MetadataFormat.dll" ]
84 | |> Some
85 | else None
86 |
87 | let binaries =
88 | directoryInfo bin
89 | |> subDirectories
90 | |> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name))
91 | |> List.ofArray
92 |
93 | let libDirs =
94 | directoryInfo bin
95 | |> subDirectories
96 | |> Array.map (fun d -> d.FullName)
97 | |> List.ofArray
98 |
99 | // Build API reference from XML comments
100 | let buildReference () =
101 | CleanDir (output @@ "reference")
102 | MetadataFormat.Generate
103 | ( binaries, output @@ "reference", layoutRootsAll.["en"],
104 | parameters = ("root", root)::info,
105 | sourceRepo = githubLink @@ "tree/master",
106 | sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
107 | ?assemblyReferences = references,
108 | publicOnly = true,libDirs = libDirs )
109 |
110 | // Build documentation from `fsx` and `md` files in `docs/content`
111 | let buildDocumentation () =
112 | let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
113 | for dir in Seq.append [content] subdirs do
114 | let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
115 | let langSpecificPath(lang, path:string) =
116 | path.Split([|'/'; '\\'|], System.StringSplitOptions.RemoveEmptyEntries)
117 | |> Array.exists(fun i -> i = lang)
118 | let layoutRoots =
119 | let key = layoutRootsAll.Keys |> Seq.tryFind (fun i -> langSpecificPath(i, dir))
120 | match key with
121 | | Some lang -> layoutRootsAll.[lang]
122 | | None -> layoutRootsAll.["en"] // "en" is the default language
123 | Literate.ProcessDirectory
124 | ( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
125 | layoutRoots = layoutRoots,
126 | ?assemblyReferences = references,
127 | generateAnchors = true )
128 |
129 | // Generate
130 | copyFiles()
131 | #if HELP
132 | buildDocumentation()
133 | #endif
134 | #if REFERENCE
135 | buildReference()
136 | #endif
137 |
--------------------------------------------------------------------------------
/docs/tools/templates/template.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | @Title
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 | @RenderBody()
34 |
35 |
36 |
37 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/paket.dependencies:
--------------------------------------------------------------------------------
1 | source https://nuget.org/api/v2
2 |
3 | nuget FSharp.Formatting
4 | nuget xUnit ~> 1.9.2
5 | nuget xUnit.runners ~> 1.9.2
6 | nuget FsUnit.xUnit
7 | nuget xunit.runner.visualstudio
8 | nuget FAKE
9 | nuget SourceLink.Fake
10 | nuget NCrontab
11 | nuget NLog
12 | nuget chessie
13 |
14 | nuget FSharp.Compiler.CodeDom
15 |
16 | nuget jQuery
17 | nuget knockoutjs
18 | nuget Microsoft.AspNet.Razor
19 | nuget Microsoft.AspNet.SignalR
20 | nuget Microsoft.AspNet.SignalR.Core
21 | nuget Microsoft.AspNet.SignalR.JS
22 | nuget Microsoft.AspNet.SignalR.SystemWeb
23 | nuget Microsoft.Owin
24 | nuget Microsoft.Owin.Hosting
25 | nuget Microsoft.Owin.Host.SystemWeb
26 | nuget Microsoft.Owin.Host.HttpListener
27 | nuget Microsoft.Owin.Security
28 | nuget Nancy
29 | nuget Nancy.Owin
30 | nuget Nancy.Viewengines.Razor
31 | nuget Newtonsoft.Json
32 | nuget Owin
33 | nuget Microsoft.Owin.Diagnostics
34 | nuget Microsoft.Owin.Cors
35 | nuget Foq
36 |
37 | nuget FSharp.Data
38 | nuget SQLProvider
39 | nuget System.Data.SQLite
40 |
41 | github fsharp/FAKE modules/Octokit/Octokit.fsx
--------------------------------------------------------------------------------
/paket.lock:
--------------------------------------------------------------------------------
1 | NUGET
2 | remote: https://nuget.org/api/v2
3 | specs:
4 | Chessie (0.1.1)
5 | FSharp.Core
6 | EntityFramework (6.1.3) - framework: net40, >= net45, >= net451
7 | FAKE (3.31.4)
8 | Foq (1.7)
9 | FSharp.Compiler.CodeDom (0.9.2)
10 | FSharp.Compiler.Service (0.0.89)
11 | FSharp.Core (3.1.2.1)
12 | FSharp.Data (2.2.2)
13 | Zlib.Portable (>= 1.10.0) - framework: portable-net40+sl50+wp80+win80
14 | FSharp.Formatting (2.9.6)
15 | FSharp.Compiler.Service (>= 0.0.87)
16 | FSharpVSPowerTools.Core (1.8.0)
17 | FSharpVSPowerTools.Core (1.8.0)
18 | FSharp.Compiler.Service (>= 0.0.87)
19 | FsUnit.xUnit (1.3.0.1)
20 | xunit (>= 1.9.1 < 3.0) - framework: net20, >= net40, >= net45
21 | jQuery (2.1.4)
22 | knockoutjs (3.3.0)
23 | Microsoft.AspNet.Cors (5.2.3)
24 | Microsoft.AspNet.Razor (3.2.3)
25 | Microsoft.AspNet.SignalR (2.2.0)
26 | Microsoft.AspNet.SignalR.JS (>= 2.2.0)
27 | Microsoft.AspNet.SignalR.SystemWeb (>= 2.2.0)
28 | Microsoft.AspNet.SignalR.Core (2.2.0)
29 | Microsoft.Owin (>= 2.1.0)
30 | Microsoft.Owin.Security (>= 2.1.0)
31 | Newtonsoft.Json (>= 6.0.4)
32 | Owin (>= 1.0)
33 | Microsoft.AspNet.SignalR.JS (2.2.0)
34 | jQuery (>= 1.6.4)
35 | Microsoft.AspNet.SignalR.SystemWeb (2.2.0)
36 | Microsoft.AspNet.SignalR.Core (>= 2.2.0)
37 | Microsoft.Owin.Host.SystemWeb (>= 2.1.0)
38 | Microsoft.Bcl (1.1.10)
39 | Microsoft.Bcl.Build (>= 1.0.14)
40 | Microsoft.Bcl.Build (1.0.21)
41 | Microsoft.Net.Http (2.2.29)
42 | Microsoft.Bcl (>= 1.1.10)
43 | Microsoft.Bcl.Build (>= 1.0.14)
44 | Microsoft.Owin (3.0.1)
45 | Owin (>= 1.0)
46 | Microsoft.Owin.Cors (3.0.1)
47 | Microsoft.AspNet.Cors (>= 5.0.0)
48 | Microsoft.Owin (>= 3.0.1)
49 | Owin (>= 1.0)
50 | Microsoft.Owin.Diagnostics (3.0.1)
51 | Microsoft.Owin (>= 3.0.1)
52 | Owin (>= 1.0)
53 | Microsoft.Owin.Host.HttpListener (3.0.1)
54 | Microsoft.Owin.Host.SystemWeb (3.0.1)
55 | Microsoft.Owin (>= 3.0.1)
56 | Owin (>= 1.0)
57 | Microsoft.Owin.Hosting (3.0.1)
58 | Microsoft.Owin (>= 3.0.1)
59 | Owin (>= 1.0)
60 | Microsoft.Owin.Security (3.0.1)
61 | Microsoft.Owin (>= 3.0.1)
62 | Owin (>= 1.0)
63 | Nancy (1.2.0)
64 | Nancy.Owin (1.2.0)
65 | Nancy (>= 1.2.0)
66 | Owin (>= 1.0)
67 | Nancy.Viewengines.Razor (1.2.0)
68 | Microsoft.AspNet.Razor
69 | Microsoft.AspNet.Razor (>= 2.0.30506) - framework: >= net40
70 | Nancy (>= 1.2.0)
71 | ncrontab (2.0.0)
72 | Newtonsoft.Json (6.0.8)
73 | NLog (3.2.1)
74 | Octokit (0.11.0)
75 | Microsoft.Net.Http
76 | Owin (1.0)
77 | SourceLink.Fake (0.5.0)
78 | SQLProvider (0.0.9-alpha)
79 | System.Data.SQLite (1.0.96.0)
80 | System.Data.SQLite.Core (>= 1.0.96.0) - framework: net20, net40, >= net45, >= net451
81 | System.Data.SQLite.EF6 (>= 1.0.96.0) - framework: net40, >= net45, >= net451
82 | System.Data.SQLite.Linq (>= 1.0.96.0) - framework: net20, net40, >= net45, >= net451
83 | System.Data.SQLite.Core (1.0.96.0) - framework: net20, net40, >= net45, >= net451
84 | System.Data.SQLite.EF6 (1.0.96.0) - framework: net40, >= net45, >= net451
85 | EntityFramework (>= 6.1.2.0) - framework: net40, >= net45, >= net451
86 | System.Data.SQLite.Linq (1.0.96.0) - framework: net20, net40, >= net45, >= net451
87 | xunit (1.9.2)
88 | xunit.abstractions (2.0.0)
89 | xunit.assert (2.0.0)
90 | xunit.core (2.0.0)
91 | xunit.extensibility.core (2.0.0)
92 | xunit.extensibility.core (2.0.0)
93 | xunit.abstractions (2.0.0)
94 | xunit.runner.visualstudio (2.0.0)
95 | xunit.runners (1.9.2)
96 | Zlib.Portable (1.10.0) - framework: portable-net40+sl50+wp80+win80
97 | GITHUB
98 | remote: fsharp/FAKE
99 | specs:
100 | modules/Octokit/Octokit.fsx (3f9b431915b7a568217d257f50693a3fdc1c7ebc)
101 | Octokit
--------------------------------------------------------------------------------
/src/Cronix.UI/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "src/bower_modules"
3 | }
4 |
--------------------------------------------------------------------------------
/src/Cronix.UI/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | bower_modules/
4 |
5 | # Don't track build output
6 | dist/
7 |
--------------------------------------------------------------------------------
/src/Cronix.UI/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Cronix.UI/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cronix-ui",
3 | "version": "0.0.0",
4 | "private": true,
5 | "dependencies": {
6 | "crossroads": "~0.12.0",
7 | "hasher": "~1.2.0",
8 | "requirejs": "~2.1.11",
9 | "requirejs-text": "~2.0.10",
10 | "knockout": "~3.3.0-alpha",
11 | "knockout-projections": "~1.1.0",
12 | "moment": "~2.10.2"
13 | },
14 | "resolutions": {
15 | "knockout": "~3.3.0-alpha"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Cronix.UI/gulpfile.js:
--------------------------------------------------------------------------------
1 | // Node modules
2 | var fs = require('fs'), vm = require('vm'), merge = require('deeply'), chalk = require('chalk'), es = require('event-stream');
3 | var output = 'dist';
4 |
5 | // Gulp and plugins
6 | var gulp = require('gulp'), rjs = require('gulp-requirejs-bundler'), concat = require('gulp-concat'), clean = require('gulp-clean'),
7 | replace = require('gulp-replace'), uglify = require('gulp-uglify'), htmlreplace = require('gulp-html-replace');
8 |
9 | // Config
10 | var requireJsRuntimeConfig = vm.runInNewContext(fs.readFileSync('src/app/require.config.js') + '; require;');
11 | requireJsOptimizerConfig = merge(requireJsRuntimeConfig, {
12 | out: 'scripts.js',
13 | baseUrl: './src',
14 | name: 'app/startup',
15 | paths: {
16 | requireLib: 'bower_modules/requirejs/require'
17 | },
18 | include: [
19 | 'requireLib',
20 | 'components/nav-bar/nav-bar',
21 | 'components/job-preview/job-preview'
22 | ],
23 | insertRequire: ['app/startup'],
24 | bundles: {
25 | // If you want parts of the site to load on demand, remove them from the 'include' list
26 | // above, and group them into bundles here.
27 | // 'bundle-name': [ 'some/module', 'another/module' ],
28 | // 'another-bundle-name': [ 'yet-another-module' ]
29 | }
30 | });
31 |
32 | // Discovers all AMD dependencies, concatenates together all required .js files, minifies them
33 | gulp.task('js', function () {
34 | return rjs(requireJsOptimizerConfig)
35 | .pipe(uglify({ preserveComments: 'some' }))
36 | .pipe(gulp.dest(output));
37 | });
38 |
39 | // Concatenates CSS files, rewrites relative paths to Bootstrap fonts, copies Bootstrap fonts
40 | gulp.task('css', function () {
41 | var bowerCss = gulp.src('src/css/bootstrap.css').pipe(replace(/url\((')?\.\/fonts\//g, 'url($1fonts/')),
42 | appCss = gulp.src('src/css/*.css'),
43 | combinedCss = es.concat(bowerCss, appCss).pipe(concat('css.css')),
44 | fontFiles = gulp.src('./src/css/fonts/*', { base: './src/css/' });
45 |
46 | return es.concat(combinedCss, fontFiles)
47 | .pipe(gulp.dest(output));
48 | });
49 |
50 | // Copies index.html, replacing
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
49 |
50 |
68 |
69 |
84 |
85 |
86 |
87 |
99 |
100 |
101 |